Skip to content
This repository has been archived by the owner on Jun 24, 2019. It is now read-only.

Commit

Permalink
Add SFDX initialization for Windows
Browse files Browse the repository at this point in the history
Linting.


Incremente revision
  • Loading branch information
louis-bompart committed Oct 18, 2017
1 parent 4423425 commit 237b526
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
18 changes: 15 additions & 3 deletions install.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ kew.resolve(true)
return installLib()
})
.then(saveLocationIfNeeded)
.then(initSFDX)
.fail(function (err) {
console.error('SFDX installation failed', err, err.stack)
exit(1)
Expand Down Expand Up @@ -104,9 +105,6 @@ function saveLocationIfNeeded() {

var relativeLocation = path.relative(libPath, location)
writeLocationFile(relativeLocation)

console.log('Done. sfdx binary available at', location)
exit(0)
}

function getManifestFromSalesforce() {
Expand Down Expand Up @@ -494,4 +492,18 @@ function copyIntoPlace(extractedPath, targetPath, version) {
console.log('Could not find extracted file', files)
throw new Error('Could not find extracted file')
})
}

/**
* Update sfdx-cli to the latest version for initialization purpose for windows.
*/
function initSFDX() {
var location = getTargetPlatform() === 'win32' ?
path.join(pkgPath, 'bin', 'sfdx.exe') :
path.join(pkgPath, 'bin' ,'sfdx')
if (getTargetPlatform() === 'win32') {
cp.execSync(location + ' update')
}
console.log('Done. sfdx binary available at', location)
exit(0)
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sfdx-prebuilt",
"version": "5.9.3",
"version": "5.9.4",
"keywords": [
"salesforce",
"dx",
Expand Down

0 comments on commit 237b526

Please sign in to comment.