Skip to content

Commit ad0286c

Browse files
author
Kartik Raj
authored
Fix venv tests (#20230)
Closes #19859
1 parent c70a0bc commit ad0286c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/client/common/interpreterPathService.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,14 @@ export class InterpreterPathService implements IInterpreterPathService {
7777
this.workspaceService.getConfiguration('python', resource)?.inspect<string>('defaultInterpreterPath') ?? {};
7878
return {
7979
globalValue: defaultInterpreterPath.globalValue,
80-
workspaceFolderValue: workspaceFolderSetting?.value || defaultInterpreterPath.workspaceFolderValue,
81-
workspaceValue: workspaceSetting?.value || defaultInterpreterPath.workspaceValue,
80+
workspaceFolderValue:
81+
!workspaceFolderSetting?.value || workspaceFolderSetting?.value === 'python'
82+
? defaultInterpreterPath.workspaceFolderValue
83+
: workspaceFolderSetting.value,
84+
workspaceValue:
85+
!workspaceSetting?.value || workspaceSetting?.value === 'python'
86+
? defaultInterpreterPath.workspaceValue
87+
: workspaceSetting.value,
8288
};
8389
}
8490

0 commit comments

Comments
 (0)