Skip to content

Commit 95ae9f2

Browse files
authored
fix: only try to run global bin if the bin name exists (#5253)
subdeps are in the tree but they don't have a bin
1 parent f281ec8 commit 95ae9f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

workspaces/libnpmexec/lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ const exec = async (opts) => {
161161
const globalTree = await globalArb.loadActual()
162162
const { manifest: globalManifest } =
163163
await missingFromTree({ spec, tree: globalTree, flatOptions })
164-
if (!globalManifest) {
164+
if (!globalManifest && await fileExists(`${globalBin}/${args[0]}`)) {
165165
binPaths.push(globalBin)
166166
return await run()
167167
}

0 commit comments

Comments
 (0)