Skip to content

Commit 6da5aed

Browse files
authored
Merge pull request #42 from IBM/alternate_download
Alternative download 2
2 parents 3e27f00 + 30bbc1d commit 6da5aed

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ async function installCLI() {
2222
// Insert the new line at line 60
2323
await exec.exec(`powershell -command "$content = Get-Content -Path ibmcloud_install.ps1; $content[59] = $content[59] + [Environment]::NewLine + 'Write-Host $downloadUrl'; $content | Set-Content -Path ibmcloud_install.ps1"`)
2424
// Try a new download method
25-
await exec.exec(`powershell -command "$content = Get-Content -Path ibmcloud_install.ps1; $content[61] = 'Invoke-WebRequest $downloadUrl -OutFile $DownloadedInstaller'; $content[62] = ''; $content[63] = ''; $content | Set-Content -Path ibmcloud_install.ps1"`)
25+
await exec.exec(`powershell -command "$content = Get-Content -Path ibmcloud_install.ps1; $content[61] = '(New-Object System.Net.WebClient).DownloadFile($downloadUrl, $DownloadedInstaller)'; $content[62] = ''; $content[63] = ''; $content | Set-Content -Path ibmcloud_install.ps1"`)
2626
// Print out the script content for debugging
2727
core.info('Contents of the modified script:')
2828
await exec.exec(`powershell -command "Get-Content -Path ibmcloud_install.ps1 | ForEach-Object { Write-Output $_ }"`)

0 commit comments

Comments
 (0)