Skip to content

Commit

Permalink
Fix "reactivating terminals..." for global interpreters (#22096)
Browse files Browse the repository at this point in the history
Closes #22085 closes
#22087

Will add tests in a follow up PR
  • Loading branch information
Kartik Raj authored Sep 26, 2023
1 parent 8aad457 commit bd3590d
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,13 @@ export class TerminalEnvVarCollectionService implements IExtensionActivationServ
}
}

public async _applyCollection(resource: Resource, shell = this.applicationEnvironment.shell): Promise<void> {
public async _applyCollection(resource: Resource, shell?: string): Promise<void> {
this.showProgress();
await this._applyCollectionImpl(resource, shell);
this.hideProgress();
}

private async _applyCollectionImpl(resource: Resource, shell = this.applicationEnvironment.shell): Promise<void> {
const workspaceFolder = this.getWorkspaceFolder(resource);
const settings = this.configurationService.getSettings(resource);
const envVarCollection = this.getEnvironmentVariableCollection({ workspaceFolder });
Expand Down Expand Up @@ -221,7 +226,6 @@ export class TerminalEnvVarCollectionService implements IExtensionActivationServ
const displayPath = this.pathUtils.getDisplayName(settings.pythonPath, workspaceFolder?.uri.fsPath);
const description = new MarkdownString(`${Interpreters.activateTerminalDescription} \`${displayPath}\``);
envVarCollection.description = description;
this.hideProgress();

await this.trackTerminalPrompt(shell, resource, env);
}
Expand Down

0 comments on commit bd3590d

Please sign in to comment.