Skip to content

Commit 2c72448

Browse files
authored
fix: cannot read properties of undefined reading 'value' (#211)
fixes #210
1 parent a478b35 commit 2c72448

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/extension.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,11 @@ export async function activate(context: ExtensionContext): Promise<PythonEnviron
230230
updateViewsAndStatus(statusBar, workspaceView, managerView, api);
231231
}),
232232
onDidChangeTerminalShellIntegration(async (e) => {
233-
const envVar = e.shellIntegration?.env.value;
233+
const shellEnv = e.shellIntegration?.env;
234+
if (!shellEnv) {
235+
return;
236+
}
237+
const envVar = shellEnv.value;
234238
if (envVar) {
235239
if (envVar['VIRTUAL_ENV']) {
236240
const env = await api.resolveEnvironment(Uri.file(envVar['VIRTUAL_ENV']));

0 commit comments

Comments
 (0)