Skip to content

Commit

Permalink
test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Unitech committed Jun 30, 2020
1 parent 9095d2d commit c79713c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/API.js
Original file line number Diff line number Diff line change
Expand Up @@ -1720,11 +1720,11 @@ class API {
return acc
}, [])

if (code != 0 && code != null) {
if ((code != 0 && code != null)) {
return that.exitCli(code ? code : conf.SUCCESS_EXIT);
}
// Do nothing if PM2 called programmatically and not called from CLI (also in exitCli)
if ((conf.PM2_PROGRAMMATIC && process.env.PM2_USAGE != 'CLI') || process.env.pm_id)
if ((conf.PM2_PROGRAMMATIC && process.env.PM2_USAGE != 'CLI'))
return false;

return that.Client.executeRemote('getSystemData', {}, (err, sys_infos) => {
Expand Down Expand Up @@ -1770,7 +1770,7 @@ class API {
global._auto_exit = true;
return that.streamLogs('all', 0, false, 'HH:mm:ss', false);
}
else if (!process.env.TRAVIS && acted.length > 0 && (process.stdout.isTTY || commander.attach === true)) {
else if (!process.env.TRAVIS && process.env.NODE_ENV != 'test' && acted.length > 0 && (process.stdout.isTTY || commander.attach === true)) {
Common.info(`Log streaming apps ${chalk.cyan(acted.join(' '))}, exit with Ctrl-C or will exit in 10secs`)

setTimeout(() => {
Expand Down

0 comments on commit c79713c

Please sign in to comment.