Skip to content

Commit

Permalink
fix: only try to run global bin if the bin name exists
Browse files Browse the repository at this point in the history
subdeps are in the tree but they don't have a bin
  • Loading branch information
wraithgar committed Aug 3, 2022
1 parent ca756fd commit f1299ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion workspaces/libnpmexec/lib/index.js
Expand Up @@ -158,7 +158,7 @@ const exec = async (opts) => {
const globalArb = new Arborist({ ...flatOptions, path: globalPath, global: true })
const globalTree = await globalArb.loadActual()
const globalManifest = await missingFromTree({ spec, tree: globalTree, flatOptions })
if (!globalManifest) {
if (!globalManifest && await fileExists(`${globalBin}/${args[0]}`)) {
binPaths.push(globalBin)
return await run()
}
Expand Down

0 comments on commit f1299ba

Please sign in to comment.