diff --git a/src/features/execution/envVariableManager.ts b/src/features/execution/envVariableManager.ts index 28db0c43..d0317f24 100644 --- a/src/features/execution/envVariableManager.ts +++ b/src/features/execution/envVariableManager.ts @@ -37,11 +37,11 @@ export class PythonEnvVariableManager implements EnvVarManager { } async getEnvironmentVariables( - uri: Uri, + uri: Uri | undefined, overrides?: ({ [key: string]: string | undefined } | Uri)[], baseEnvVar?: { [key: string]: string | undefined }, ): Promise<{ [key: string]: string | undefined }> { - const project = this.pm.get(uri); + const project = uri ? this.pm.get(uri) : undefined; const base = baseEnvVar || { ...process.env }; let env = base;