File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,11 @@ export default async function findPython(): Promise<string | undefined> {
6565 "python path or it is not supported:" ,
6666 version
6767 ) ;
68- // TODO: clear python path from settings
68+ // if version is not supported, clear the path
69+ await Settings . getInstance ( ) ?. updateGlobal (
70+ SettingsKey . python3Path ,
71+ undefined
72+ ) ;
6973 }
7074 } catch ( error ) {
7175 Logger . warn (
@@ -75,6 +79,18 @@ export default async function findPython(): Promise<string | undefined> {
7579 ) ;
7680 }
7781 }
82+ // if path does not exist, clear it
83+ else {
84+ Logger . warn (
85+ LoggerSource . pythonHelper ,
86+ "Python path set in user settings does not exist:" ,
87+ pythonPath
88+ ) ;
89+ await Settings . getInstance ( ) ?. updateGlobal (
90+ SettingsKey . python3Path ,
91+ undefined
92+ ) ;
93+ }
7894 }
7995
8096 // Check python extension for any python environments with version >= 3.9
You can’t perform that action at this time.
0 commit comments