Skip to content
Closed
Changes from 1 commit
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 -o "pid,args" || ps -wweo "pid,args"';
Comment thread
nAnderYang marked this conversation as resolved.
Outdated
const stdio = await runScript(command, { stdio: 'pipe' });
const processList = stdio.stdout!.toString().split('\n')
.reduce<NodeProcess[]>((arr, line) => {
Expand Down