From f1299ba7e084b7a792afd2323cae242a103b9fd3 Mon Sep 17 00:00:00 2001 From: Gar Date: Wed, 3 Aug 2022 09:50:13 -0700 Subject: [PATCH] fix: only try to run global bin if the bin name exists 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 fcc596d313778..a554937cfa489 100644 --- a/workspaces/libnpmexec/lib/index.js +++ b/workspaces/libnpmexec/lib/index.js @@ -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() }