Skip to content

Commit

Permalink
fix: only try to run global bin if the bin name exists (#5253)
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 9, 2022
1 parent f281ec8 commit 95ae9f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion workspaces/libnpmexec/lib/index.js
Expand Up @@ -161,7 +161,7 @@ const exec = async (opts) => {
const globalTree = await globalArb.loadActual()
const { manifest: 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 95ae9f2

Please sign in to comment.