Skip to content
This repository has been archived by the owner on Apr 8, 2024. It is now read-only.

Commit

Permalink
fix: shelljs.exec whoopsies
Browse files Browse the repository at this point in the history
  • Loading branch information
RodEsp committed Oct 7, 2021
1 parent 97791ad commit b408631
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions scripts/include-sf.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@ const path = require('path');
const shelljs = require('shelljs');
const fs = require('fs');

const sfGlobalPath = path.join(shelljs.exec('npm list -g --depth 0 | head -1'), 'node_modules', '@salesforce', 'cli');

// Copy sf to the bin/cli dir of sfdx
shelljs.mv('-f', sfGlobalPath, path.join(process.cwd(), 'bin', 'sf-cli'));
try {
const sfGlobalPath = path.join(shelljs.exec('npm list -g --depth 0 | head -1').stdout, 'node_modules', '@salesforce', 'cli');

// Copy sf to the bin/cli dir of sfdx
shelljs.mv('-f', sfGlobalPath, path.join(process.cwd(), 'bin', 'sf-cli'));
} catch (e) {
console.error('Error: can\'t find the global sf install.')
throw e;
}

const sfUnixPath = 'bin/sf-cli/bin/run';
const sfBin = path.join('bin', 'sf');
Expand Down

0 comments on commit b408631

Please sign in to comment.