diff --git a/CHANGELOG.md b/CHANGELOG.md index 7160da8e..0016cb8c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ - New flag `--no-pmx` : starts an app without injecting pmx - New feature : cron restart now works in fork mode as well +# 0.14.7 + +- Disable auto-gc on interactor +- Allow PM2 to execute binaries in $PATH +- pm2 link priv pub --recyle for elastic infrastructure + # 0.14.6 - Scoped PM2 actions diff --git a/lib/Common.js b/lib/Common.js index 168ca027..0962fd7c 100644 --- a/lib/Common.js +++ b/lib/Common.js @@ -11,11 +11,10 @@ var Utility = require('./Utility.js'); var async = require('async'); var cst = require('../constants.js'); var extItps = require('./interpreter.json'); +var shelljs = require('shelljs'); var p = path; var Satan = require('./Satan.js'); -var iojs = require('is-iojs'); - var InteractorDaemonizer = require('./Interactor/InteractorDaemonizer.js'); /** @@ -37,10 +36,6 @@ Common.prepareAppConf = function(app, cwd, outputter) { * Check if PM2 is runned with iojs to handle next-gen-js */ if (app.next_gen_js) { - // if (!iojs) { - // return new Error('To run next generation Javascript you need to run PM2 with io.js'); - // } - // If fork mode set the right interpreter if ((app.exec_mode == 'fork_mode' || app.exec_mode == 'fork' || @@ -76,12 +71,18 @@ Common.prepareAppConf = function(app, cwd, outputter) { cwd = cwd || process.cwd(); app.pm_exec_path = p.resolve(cwd, app.script); - delete app.script; if (!fs.existsSync(app.pm_exec_path)) { - return new Error('script not found : ' + app.pm_exec_path); + var ckd; + // Resolve command + if (ckd = shelljs.which(app.script)) + app.pm_exec_path = ckd; + else + return new Error('script not found : ' + app.pm_exec_path); } + delete app.script; + // Set current env by first adding the process environment and then extending/replacing it // with env specified on command-line or JSON file. app.env = [{}, process.env, app.env || {}, {pm_cwd: cwd}].reduce(function(e1, e2){ diff --git a/package.json b/package.json index c832d444..f0165254 100644 --- a/package.json +++ b/package.json @@ -119,6 +119,8 @@ "node-pm2", "production", "keymetrics", + "node.js monitoring", + "strong-pm", "deploy", "deployment", "daemon", @@ -130,6 +132,8 @@ "monitoring", "process manager", "forever", + "profiling", + "probes", "forever-monitor", "keep process alive", "process configuration", @@ -169,7 +173,6 @@ "safe-clone-deep" : "1.0.5", "babel" : "^5.x", - "is-iojs" : "1.1.0", "shelljs" : "0.5.1", "isbinaryfile" : "^3.0.0", diff --git a/test/bash/binary.sh b/test/bash/binary.sh index 30562175..d5f779ee 100644 --- a/test/bash/binary.sh +++ b/test/bash/binary.sh @@ -42,3 +42,15 @@ OUT=$(getInterpreter) success "$1" $pm2 kill + +# +# Should execute command in $PATH +# +$pm2 start ls +spec "Should script started" + +OUT=$(getInterpreter) +[ $OUT="none" ] || fail "$1" +success "Right interpreter" + +should 'Have the right relative path' '/bin/ls' 1