Skip to content

Commit a44e716

Browse files
committed
sfdx-actions#7 - updates location of tarball and manually updates the PATH per https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#adding-a-system-path now that there's no longer an install script for sfdx
1 parent 995ab39 commit a44e716

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ try {
99
}
1010

1111
function installSFDX(){
12-
var download = 'wget https://developer.salesforce.com/media/salesforce-cli/sfdx-linux-amd64.tar.xz -P /tmp'
12+
var download = 'wget https://developer.salesforce.com/media/salesforce-cli/sfdx/channels/stable/sfdx-linux-x64.tar.xz -P /tmp'
1313
var createDir = 'mkdir sfdx'
1414
var unzip = 'tar xJf /tmp/sfdx-linux-amd64.tar.xz -C sfdx --strip-components 1'
15-
var install = './sfdx/install'
16-
var clean = 'rm -r ./sfdx'
17-
exec(download+' && '+createDir+' && '+unzip+' && '+install+' && '+clean, function(error, stdout, stderr){
15+
var install = 'echo "`pwd`/sfdx/bin" >> $GITHUB_PATH'
16+
var version = 'sfdx/bin/sfdx --version'
17+
exec(download+' && '+createDir+' && '+unzip+' && '+install+' && '+version, function(error, stdout, stderr){
1818
if(error) throw(stderr)
1919
core.debug(stdout)
2020
if(core.getInput('sfdx-auth-url')) createAuthFile()
@@ -27,8 +27,8 @@ function createAuthFile(){
2727
}
2828

2929
function authSFDX(){
30-
var params = '--setdefaultdevhubusername --setdefaultusername -a SFDX-ENV'
31-
exec('sfdx auth:sfdxurl:store -f /tmp/sfdx_auth.txt '+params, function(error, stdout, stderr){
30+
var params = '--setdefaultdevhubusername -a SFDX-ENV'
31+
exec('sfdx/bin/sfdx auth:sfdxurl:store -f /tmp/sfdx_auth.txt '+params, function(error, stdout, stderr){
3232
if(error) throw(stderr)
3333
core.debug(stdout)
3434
})

0 commit comments

Comments
 (0)