mirror of
https://github.com/Unitech/pm2.git
synced 2025-12-08 20:35:53 +00:00
parent
1577535be0
commit
f98ded6b71
20
lib/API.js
20
lib/API.js
@ -833,17 +833,27 @@ API.prototype._startJson = function(file, opts, action, pipe, cb) {
|
||||
var apps_info = [];
|
||||
var that = this;
|
||||
|
||||
if (typeof(cb) === 'undefined' && typeof(pipe) === 'function')
|
||||
if (typeof(cb) === 'undefined' && typeof(pipe) === 'function') {
|
||||
cb = pipe;
|
||||
}
|
||||
|
||||
if (typeof(file) === 'object')
|
||||
if (typeof(file) === 'object') {
|
||||
config = file;
|
||||
else if (pipe == 'pipe')
|
||||
} else if (pipe === 'pipe') {
|
||||
config = Common.parseConfig(file, 'pipe');
|
||||
else {
|
||||
} else {
|
||||
var data = null;
|
||||
|
||||
var file_path = path.isAbsolute(file) ? file : path.join(that.cwd, file);
|
||||
var isAbsolute = false
|
||||
|
||||
//node 0.11 compatibility #2815
|
||||
if (typeof path.isAbsolute === 'function') {
|
||||
isAbsolute = path.isAbsolute(file)
|
||||
} else {
|
||||
isAbsolute = /^\/|\\/.test(file)
|
||||
}
|
||||
|
||||
var file_path = isAbsolute ? file : path.join(that.cwd, file);
|
||||
|
||||
debug('Resolved filepath %s', file_path);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user