From af6ca9a7259cf11d76649ab5563865e04adc89b1 Mon Sep 17 00:00:00 2001 From: Abby Date: Sat, 12 Jul 2025 21:34:33 +0900 Subject: [PATCH] fix: update console log commands to use double quotes for PATH variable --- lib/API/Startup.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/API/Startup.js b/lib/API/Startup.js index b8773a40d..f4d42c121 100644 --- a/lib/API/Startup.js +++ b/lib/API/Startup.js @@ -29,11 +29,11 @@ module.exports = function(CLI) { } if (opts.user) { - console.log('sudo env PATH=$PATH:' + path.dirname(process.execPath) + ' pm2 ' + opts.args[1].name() + ' ' + platform + ' -u ' + opts.user + ' --hp ' + process.env.HOME); + console.log('sudo env PATH="$PATH:' + path.dirname(process.execPath) + '" pm2 ' + opts.args[1].name() + ' ' + platform + ' -u ' + opts.user + ' --hp ' + process.env.HOME); return cb(new Error('You have to run this with elevated rights')); } return sexec('whoami', {silent: true}, function(err, stdout, stderr) { - console.log('sudo env PATH=$PATH:' + path.dirname(process.execPath) + ' ' + pm2_bin_path + ' ' + opts.args[1].name() + ' ' + platform + ' -u ' + stdout.trim() + ' --hp ' + process.env.HOME); + console.log('sudo env PATH="$PATH:' + path.dirname(process.execPath) + '" ' + pm2_bin_path + ' ' + opts.args[1].name() + ' ' + platform + ' -u ' + stdout.trim() + ' --hp ' + process.env.HOME); return cb(new Error('You have to run this with elevated rights')); }); }