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 8
8
//! `x.py`, in that order of preference.
9
9
10
10
use std:: {
11
- env, io,
11
+ env:: { self , consts:: EXE_EXTENSION } ,
12
+ io,
12
13
process:: { self , Command , ExitStatus } ,
13
14
} ;
14
15
@@ -27,12 +28,12 @@ fn python() -> &'static str {
27
28
28
29
for dir in env:: split_paths ( & val) {
29
30
// `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 ( ) {
31
32
return PYTHON ;
32
33
}
33
34
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 ( ) ;
36
37
}
37
38
38
39
// try 3 before 2
You can’t perform that action at this time.
0 commit comments