Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/managers/common/nativePythonFinder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1544,6 +1544,9 @@ function getPythonSettingAndUntildify<T>(name: string, scope?: Uri): T | undefin
if (typeof value === 'string') {
return value ? (untildify(value as string) as unknown as T) : undefined;
}
if (Array.isArray(value)) {
return untildifyArray(value) as unknown as T;
}
return value;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,8 @@ suite('getAllExtraSearchPaths Integration Tests', () => {

test('Legacy paths with untildify support', async () => {
// Mock → Legacy paths with tilde expansion
// Note: getPythonSettingAndUntildify only untildifies strings, not array items
// So we return the venvPath with tilde (will be untildified) and venvFolders pre-expanded
pythonConfig.get.withArgs('venvPath').returns('~/virtualenvs');
pythonConfig.get.withArgs('venvFolders').returns(['/home/user/conda/envs']); // Pre-expanded
pythonConfig.get.withArgs('venvFolders').returns(['~/conda/envs']);
envConfig.inspect.withArgs('globalSearchPaths').returns({ globalValue: [] });
envConfig.inspect.withArgs('workspaceSearchPaths').returns({});

Expand Down