-
Notifications
You must be signed in to change notification settings - Fork 297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get activate env vars for non-conda as well #9163
Conversation
@@ -51,7 +51,7 @@ export class KernelEnvironmentVariablesService { | |||
|
|||
let [customEditVars, interpreterEnv] = await Promise.all([ | |||
this.customEnvVars.getCustomEnvironmentVariables(resource).catch(noop), | |||
interpreter && interpreter.envType == EnvironmentType.Conda |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was wrong, we should get activated env variables for Virtual Env, etc, not just Conda environments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will work for virtual environments
if (interpreter) { | ||
const env = kernelEnv || process.env; | ||
this.envVarsService.prependPath(env, path.dirname(interpreter.path)); | ||
return env; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fall back, if we do'nt have any env variables, then prefix PATH as we do in other cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will work for global interpreters
Fixes #9089