From 790fc4dc8357faabd9177ae641c8be1cf07c774c Mon Sep 17 00:00:00 2001 From: "Zed A. Shaw" Date: Wed, 1 Feb 2023 07:30:13 -0500 Subject: [PATCH] Enable the noexit option on devsvc so that linux will work on init. --- commands/devsvc.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); } }