File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -70,10 +70,16 @@ export class PythonManager {
70
70
}
71
71
72
72
private doActiveEnvironmentPathChanged ( event : ActiveEnvironmentPathChangeEvent ) : void {
73
- this . outputChannel . appendLine (
74
- `ActiveEnvironmentPathChanged: ${ event . resource ?. uri . toString ( ) ?? UNKNOWN } ${ event . id } ` ,
75
- ) ;
76
- this . _onActivePythonEnvironmentChangedEmitter . fire ( { resource : event . resource } ) ;
73
+ const wsFolder =
74
+ event . resource === undefined
75
+ ? undefined
76
+ : event . resource instanceof vscode . Uri
77
+ ? vscode . workspace . getWorkspaceFolder ( event . resource )
78
+ : event . resource ;
79
+
80
+ this . outputChannel . appendLine ( `ActiveEnvironmentPathChanged: ${ wsFolder ?. uri ?? UNKNOWN } ${ event . id } ` ) ;
81
+
82
+ this . _onActivePythonEnvironmentChangedEmitter . fire ( { resource : wsFolder } ) ;
77
83
}
78
84
79
85
async getPythonExtension ( ) : Promise < PythonExtension | undefined > {
You can’t perform that action at this time.
0 commit comments