Skip to content

Commit

Permalink
Fix spawn in package-managers/npm.
Browse files Browse the repository at this point in the history
  • Loading branch information
raineorshine committed Mar 13, 2024
1 parent c76f14f commit a898848
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/package-managers/npm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,8 @@ async function spawnNpm(
'--json',
...(Array.isArray(args) ? args : [args]),
]
return spawn(cmd, fullArgs, spawnPleaseOptions, spawnOptions)
const { stdout } = await spawn(cmd, fullArgs, spawnPleaseOptions, spawnOptions)
return stdout
}

/**
Expand Down Expand Up @@ -663,9 +664,11 @@ export const list = async (options: Options = {}): Promise<Index<string | undefi
...(options.prefix ? { prefix: options.prefix } : null),
},
{
...(options.cwd ? { cwd: options.cwd } : null),
rejectOnError: false,
},
{
...(options.cwd ? { cwd: options.cwd } : null),
},
)
const dependencies = parseJson<{
dependencies: Index<{ version?: Version; required?: { version: Version } }>
Expand Down

0 comments on commit a898848

Please sign in to comment.