Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export async function findNodeProcess(filterFn?: FilterFunction): Promise<NodePr
const command = isWindows ?
'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 -wweo "pid,args"';
'command -v ps >/dev/null 2>&1 && ps --help 2>&1 | grep -q BusyBox && ps -w -A -o pid,args || ps -wweo "pid,args"';
const stdio = await runScript(command, { stdio: 'pipe' });
const processList = stdio.stdout!.toString().split('\n')
.reduce<NodeProcess[]>((arr, line) => {
Expand Down
Loading