Skip to content

Commit

Permalink
fix: cannot read properties of undefined reading 'value' (#211)
Browse files Browse the repository at this point in the history
fixes #210
  • Loading branch information
karthiknadig authored Mar 5, 2025
1 parent a478b35 commit 2c72448
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,11 @@ export async function activate(context: ExtensionContext): Promise<PythonEnviron
updateViewsAndStatus(statusBar, workspaceView, managerView, api);
}),
onDidChangeTerminalShellIntegration(async (e) => {
const envVar = e.shellIntegration?.env.value;
const shellEnv = e.shellIntegration?.env;
if (!shellEnv) {
return;
}
const envVar = shellEnv.value;
if (envVar) {
if (envVar['VIRTUAL_ENV']) {
const env = await api.resolveEnvironment(Uri.file(envVar['VIRTUAL_ENV']));
Expand Down

0 comments on commit 2c72448

Please sign in to comment.