diff --git a/commands/devsvc.js b/commands/devsvc.js index d12d0b1..e5fb51c 100644 --- a/commands/devsvc.js +++ b/commands/devsvc.js @@ -6,7 +6,7 @@ export const description = "Runs various services needed for development"; export const options = [ ['--stop', `Stop the ${process.platform} OS services.`], ['--start', `Start the ${process.platform} OS services (the default).`], - ['--noexit', `When used in other commands, don't call process.exit.`], + ['--noexit', `When used in other commands, don't call process.exit. Used when calling from other commands.`], ['--os ', 'Force the process.platform to specific one'] ] @@ -36,7 +36,7 @@ const linux = (opts) => { darwin(opts); } else { console.error("On Linux you should run redis-server using systemctl or similar. If you really want to use pm2 to manage redis then rerun this command with: --os linux"); - process.exit(1); + if(!opts.noexit) process.exit(1); } } @@ -55,7 +55,7 @@ export const main = (opts) => { if(opts.noexit) { throw new Error("invalid OS error."); } else { - process.exit(1); + if(!opts.noexit) process.exit(1); } }