Skip to content

Commit

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

Closes microsoft#22085 closes
microsoft#22087

Will add tests in a follow up PR
  • Loading branch information
Kartik Raj authored and eleanorjboyd committed Oct 2, 2023
1 parent b6003e9 commit 9d87f6b
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 9d87f6b

Please sign in to comment.