From 95ae9f2e2555ef592777399bf8fee5206d77f41d Mon Sep 17 00:00:00 2001 From: Gar Date: Tue, 9 Aug 2022 12:33:19 -0700 Subject: [PATCH] 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 --- workspaces/libnpmexec/lib/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workspaces/libnpmexec/lib/index.js b/workspaces/libnpmexec/lib/index.js index efaeccafb615b..0b0565ca92072 100644 --- a/workspaces/libnpmexec/lib/index.js +++ b/workspaces/libnpmexec/lib/index.js @@ -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() }