Skip to content

Commit

Permalink
hotfix: fix #3767, do not consider as a command if space and slash ar…
Browse files Browse the repository at this point in the history
…e found
  • Loading branch information
wallet77 committed Jul 5, 2018
1 parent f8ec150 commit d15a12c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Common.js
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,8 @@ Common.verifyConfs = function(appConfs){

// If command is like pm2 start "python xx.py --ok"
// Then automatically start the script with bash -c and set a name eq to command
if (app.script && app.script.indexOf(' ') > -1 && app.script.indexOf('/') === -1 && app.script.indexOf('\\') === -1) {

if (app.script && app.script.indexOf(' ') > -1 && app.script === path.basename(app.script)) {
var _script = app.script;
if (require('shelljs').which('bash'))
app.script = 'bash';
Expand Down

0 comments on commit d15a12c

Please sign in to comment.