File tree 3 files changed +20
-10
lines changed
3 files changed +20
-10
lines changed Original file line number Diff line number Diff line change @@ -447,6 +447,16 @@ Common.sink.resolveInterpreter = function(app) {
447
447
// No interpreter defined and correspondance in schema hashmap
448
448
if ( noInterpreter && betterInterpreter ) {
449
449
app . exec_interpreter = betterInterpreter ;
450
+
451
+ if ( betterInterpreter == "python" ) {
452
+ if ( which ( 'python' ) == null )
453
+ if ( which ( 'python3' ) == null ) {
454
+ Common . printError ( cst . PREFIX_MSG_WARNING + chalk . bold . yellow ( 'python and python3 binaries not available in PATH' ) ) ;
455
+ }
456
+ else {
457
+ app . exec_interpreter = 'python3' ;
458
+ }
459
+ }
450
460
}
451
461
// Else if no Interpreter detect if process is binary
452
462
else if ( noInterpreter )
Original file line number Diff line number Diff line change @@ -138,14 +138,14 @@ spec "stderr cb written"
138
138
139
139
$pm2 delete all
140
140
141
- # # # #2350 verify all script have been killed
142
- # $pm2 start python-script.py
143
- # $pm2 start echo.js
144
- # should 'should app be online' 'online' 2
141
+ # # #2350 verify all script have been killed
142
+ $pm2 start python-script.py
143
+ $pm2 start echo.js
144
+ should ' should app be online' ' online' 2
145
145
146
- # kill `cat ~/.pm2/pm2.pid`
147
- # spec "should have killed pm2"
146
+ kill ` cat ~ /.pm2/pm2.pid`
147
+ spec " should have killed pm2"
148
148
149
- # sleep 3
150
- # pgrep "python"
151
- # ispec "should python script be killed"
149
+ sleep 3
150
+ pgrep " python"
151
+ ispec " should python script be killed"
Original file line number Diff line number Diff line change 2
2
3
3
if __name__ == "__main__" :
4
4
while 1 :
5
- print 'Script.py: alive'
5
+ print ( 'Script.py: alive' )
6
6
time .sleep (1 )
You can’t perform that action at this time.
0 commit comments