File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ import zlib from 'zlib';
2424export async function findPythonExecutable ( ) {
2525 const exenames = proc . IS_WINDOWS ? [ 'python.exe' ] : [ 'python3' , 'python' ] ;
2626 const envPath = process . env . PLATFORMIO_PATH || process . env . PATH ;
27+ const errors = [ ] ;
2728 for ( const location of envPath . split ( path . delimiter ) ) {
2829 for ( const exename of exenames ) {
2930 const executable = path . normalize ( path . join ( location , exename ) ) . replace ( / " / g, '' ) ;
@@ -36,9 +37,15 @@ export async function findPythonExecutable() {
3637 }
3738 } catch ( err ) {
3839 console . warn ( executable , err ) ;
40+ errors . push ( err ) ;
3941 }
4042 }
4143 }
44+ for ( const err of errors ) {
45+ if ( err . toString ( ) . includes ( 'Could not find distutils module' ) ) {
46+ throw err ;
47+ }
48+ }
4249 return null ;
4350}
4451
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ export function getErrorReportUrl(title, description) {
8383 'https://github.com/platformio/platformio-vscode-ide/issues/205' ,
8484 ] ,
8585 [
86- 'missed ` distutils` ' ,
86+ 'Could not find distutils module ' ,
8787 'https://github.com/platformio/platformio-core-installer/issues/85' ,
8888 ] ,
8989 [
You can’t perform that action at this time.
0 commit comments