Enable the noexit option on devsvc so that linux will work on init.

main
Zed A. Shaw 2 years ago
parent 8e5121cbad
commit 790fc4dc83
  1. 6
      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 <platform>', '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);
}
}

Loading…
Cancel
Save