From 425569881bb974f976775fbf61d74ce5c4d20a27 Mon Sep 17 00:00:00 2001 From: Rodrigo Espinosa de los Monteros <1084688+RodEsp@users.noreply.github.com> Date: Fri, 8 Oct 2021 13:18:21 -0400 Subject: [PATCH] fix: find npmGlobalBin with shelljs --- scripts/include-sf.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/include-sf.js b/scripts/include-sf.js index 226678be..66e9feab 100755 --- a/scripts/include-sf.js +++ b/scripts/include-sf.js @@ -4,7 +4,7 @@ const path = require('path'); const shelljs = require('shelljs'); const fs = require('fs'); -const npmGlobalBin = shelljs.exec('npm list -g --depth 0 | head -1').stdout.trim(); +const npmGlobalBin = path.dirname(shelljs.which('sf')); const sfGlobalPath = path.join(npmGlobalBin, 'node_modules', '@salesforce', 'cli'); // Copy globally installed sf to sf-cli/ at root of sfdx