File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 88//! `x.py`, in that order of preference.
99
1010use std:: {
11- env, io,
11+ env:: { self , consts:: EXE_EXTENSION } ,
12+ io,
1213 process:: { self , Command , ExitStatus } ,
1314} ;
1415
@@ -27,12 +28,12 @@ fn python() -> &'static str {
2728
2829 for dir in env:: split_paths ( & val) {
2930 // `python` should always take precedence over python2 / python3 if it exists
30- if dir. join ( PYTHON ) . exists ( ) {
31+ if dir. join ( PYTHON ) . with_extension ( EXE_EXTENSION ) . exists ( ) {
3132 return PYTHON ;
3233 }
3334
34- python2 |= dir. join ( PYTHON2 ) . exists ( ) ;
35- python3 |= dir. join ( PYTHON3 ) . exists ( ) ;
35+ python2 |= dir. join ( PYTHON2 ) . with_extension ( EXE_EXTENSION ) . exists ( ) ;
36+ python3 |= dir. join ( PYTHON3 ) . with_extension ( EXE_EXTENSION ) . exists ( ) ;
3637 }
3738
3839 // try 3 before 2
You can’t perform that action at this time.
0 commit comments