Skip to content
Merged
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
18 changes: 17 additions & 1 deletion src/utils/pythonHelper.mts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ export default async function findPython(): Promise<string | undefined> {
"python path or it is not supported:",
version
);
// TODO: clear python path from settings
// if version is not supported, clear the path
await Settings.getInstance()?.updateGlobal(
SettingsKey.python3Path,
undefined
);
}
} catch (error) {
Logger.warn(
Expand All @@ -75,6 +79,18 @@ export default async function findPython(): Promise<string | undefined> {
);
}
}
// if path does not exist, clear it
else {
Logger.warn(
LoggerSource.pythonHelper,
"Python path set in user settings does not exist:",
pythonPath
);
await Settings.getInstance()?.updateGlobal(
SettingsKey.python3Path,
undefined
);
}
}

// Check python extension for any python environments with version >= 3.9
Expand Down
Loading