From 0ba45bcdc2eb8a49c9aee0e1ec2839207d7843b2 Mon Sep 17 00:00:00 2001 From: skybach Date: Wed, 6 Apr 2016 13:27:22 +0800 Subject: [PATCH] fix to spawn app in each workingDir or sourcDir fix to use json config file's workingDir or sourceDir if available for spawning --- lib/forever/cli.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/forever/cli.js b/lib/forever/cli.js index e6a284aa..9fc11d21 100644 --- a/lib/forever/cli.js +++ b/lib/forever/cli.js @@ -314,6 +314,9 @@ app.cmd(/start (.+)/, cli.startDaemon = function () { options = getOptions(file); options.forEach(function (o) { + + o.spawnWith.cwd = o.workingDir || o.sourceDir || o.spawnWith.cwd; + forever.log.info('Forever processing file: ' + o.script.grey); tryStart(o.script, o, function () { forever.startDaemon(o.script, o);