Skip to content

Commit 9a3761e

Browse files
authored
Merge pull request #41 from IBM/alternate_download
Try an alternative download method
2 parents 46e534e + 4e4a42d commit 9a3761e

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

dist/index.js

Lines changed: 2 additions & 0 deletions
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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ async function installCLI() {
2121
await exec.exec(`powershell -command "'Set-PSDebug -Trace 2' + [Environment]::NewLine + (Get-Content -Path ibmcloud_install.ps1 -Raw) | Set-Content -Path ibmcloud_install.ps1"`)
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"`)
24+
// 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"`)
2426
// Print out the script content for debugging
2527
core.info('Contents of the modified script:')
2628
await exec.exec(`powershell -command "Get-Content -Path ibmcloud_install.ps1 | ForEach-Object { Write-Output $_ }"`)

0 commit comments

Comments
 (0)