Skip to content

Commit f82b192

Browse files
authored
Merge pull request #35 from IBM/debug_windows_download_issues
More debugging of the powershell script to diagnose installation issues
2 parents 0c24ab2 + 14de5ec commit f82b192

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
@@ -19,6 +19,8 @@ async function installCLI() {
1919
await exec.exec(`powershell -command "(New-Object Net.WebClient).DownloadString('https://clis.cloud.ibm.com/install/powershell') | Out-File -FilePath ibmcloud_install.ps1"`)
2020
// Add @echo on as the first line
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"`)
22+
// Insert the new line at line 60
23+
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"`)
2224
// Print out the script content for debugging
2325
core.info('Contents of the modified script:')
2426
await exec.exec(`powershell -command "Get-Content -Path ibmcloud_install.ps1 | ForEach-Object { Write-Output $_ }"`)

0 commit comments

Comments
 (0)