always use full paths when starting scripts #367

Closed
wants to merge 1 commit into
from
Jump to file
+2 −2
Split
View
@@ -221,7 +221,7 @@ app.cmd('cleanlogs', cli.cleanLogs = function () {
// process.
//
app.cmd(/start (.+)/, cli.startDaemon = function () {
- var file = app.argv._[1],
+ var file = process.env.PWD + '/' + app.argv._[1].replace(/^.+\//, ''),
options = getOptions(file);
forever.log.info('Forever processing file: ' + file.grey);
@@ -492,7 +492,7 @@ app.cmd('help', cli.help = function () {
// make executing other commands possible.
//
cli.run = function () {
- var file = app.argv._[0],
+ var file = process.env.PWD + '/' + app.argv._[0].replace(/^.+\//, ''),
options = getOptions(file);
tryStart(file, options, function () {