Skip to content

Commit

Permalink
Fix error typo
Browse files Browse the repository at this point in the history
  • Loading branch information
raineorshine committed Jan 9, 2022
1 parent 15decc5 commit 5bda5fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/package-managers/npm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ export const list = async (options: Options = {}) => {
...options.cwd ? { cwd: options.cwd } : null,
rejectOnError: false
})
const json = parseJson(result, { command: `npm ls --json${options.global ? '--global' : ''}` })
const json = parseJson(result, { command: `npm${process.platform === 'win32' ? '.cmd' : ''} ls --json${options.global ? ' --global' : ''}` })
return cint.mapObject(json.dependencies, (name, info) => ({
// unmet peer dependencies have a different structure
[name]: info.version || (info.required && info.required.version)
Expand Down

0 comments on commit 5bda5fc

Please sign in to comment.