Skip to content

Commit

Permalink
Merge pull request Unitech#3768 from Unitech/spaces
Browse files Browse the repository at this point in the history
hotfix: fix Unitech#3767, do not consider as a command if space and slash ar…
  • Loading branch information
wallet77 authored Jul 10, 2018
2 parents 904695c + 6ae3ce4 commit 8120338
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/API/CliUx.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ UX.describeTable = function(process) {

{ 'exec mode' : pm2_env.exec_mode },
{ 'node.js version' : pm2_env.node_version },
{ 'node env': pm2_env.env.NODE_ENV },
{ 'watch & reload' : pm2_env.watch ? chalk.green.bold('✔') : '✘' },
{ 'unstable restarts' : pm2_env.unstable_restarts },
{ 'created at' : created_at }
Expand Down
3 changes: 2 additions & 1 deletion lib/Common.js
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,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) {

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 8120338

Please sign in to comment.