diff --git a/src/client/terminals/envCollectionActivation/indicatorPrompt.ts b/src/client/terminals/envCollectionActivation/indicatorPrompt.ts index a5338a85ba59..65db4ed3d2b3 100644 --- a/src/client/terminals/envCollectionActivation/indicatorPrompt.ts +++ b/src/client/terminals/envCollectionActivation/indicatorPrompt.ts @@ -85,6 +85,9 @@ export class TerminalIndicatorPrompt implements IExtensionSingleActivationServic } const prompts = [Common.doNotShowAgain]; const interpreter = await this.interpreterService.getActiveInterpreter(resource); + if (!interpreter) { + return; + } const terminalPromptName = getPromptName(interpreter); const selection = await this.appShell.showInformationMessage( Interpreters.terminalEnvVarCollectionPrompt.format(terminalPromptName),