Skip to content

Commit bd3590d

Browse files
author
Kartik Raj
authored
Fix "reactivating terminals..." for global interpreters (#22096)
Closes #22085 closes #22087 Will add tests in a follow up PR
1 parent 8aad457 commit bd3590d

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/client/interpreter/activation/terminalEnvVarCollectionService.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,13 @@ export class TerminalEnvVarCollectionService implements IExtensionActivationServ
125125
}
126126
}
127127

128-
public async _applyCollection(resource: Resource, shell = this.applicationEnvironment.shell): Promise<void> {
128+
public async _applyCollection(resource: Resource, shell?: string): Promise<void> {
129129
this.showProgress();
130+
await this._applyCollectionImpl(resource, shell);
131+
this.hideProgress();
132+
}
133+
134+
private async _applyCollectionImpl(resource: Resource, shell = this.applicationEnvironment.shell): Promise<void> {
130135
const workspaceFolder = this.getWorkspaceFolder(resource);
131136
const settings = this.configurationService.getSettings(resource);
132137
const envVarCollection = this.getEnvironmentVariableCollection({ workspaceFolder });
@@ -221,7 +226,6 @@ export class TerminalEnvVarCollectionService implements IExtensionActivationServ
221226
const displayPath = this.pathUtils.getDisplayName(settings.pythonPath, workspaceFolder?.uri.fsPath);
222227
const description = new MarkdownString(`${Interpreters.activateTerminalDescription} \`${displayPath}\``);
223228
envVarCollection.description = description;
224-
this.hideProgress();
225229

226230
await this.trackTerminalPrompt(shell, resource, env);
227231
}

0 commit comments

Comments
 (0)