From b1d954ec4893e0ff2fb9d7e5222073732c28f534 Mon Sep 17 00:00:00 2001 From: klook Date: Tue, 15 Feb 2022 18:34:38 +0800 Subject: [PATCH] fix: ps-cmd result may be truncated --- lib/helper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/helper.js b/lib/helper.js index 0f42f6c..d9de722 100644 --- a/lib/helper.js +++ b/lib/helper.js @@ -8,7 +8,7 @@ exports.findNodeProcess = function* (filterFn) { const command = isWin ? 'wmic Path win32_process Where "Name = \'node.exe\'" Get CommandLine,ProcessId' : // command, cmd are alias of args, not POSIX standard, so we use args - 'ps -eo "pid,args"'; + 'ps -wweo "pid,args"'; const stdio = yield runScript(command, { stdio: 'pipe' }); const processList = stdio.stdout.toString().split('\n') .reduce((arr, line) => {