diff options
author | John McCrae <john.mccrae@progress.com> | 2022-11-14 16:37:37 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-14 16:37:37 -0800 |
commit | b0f87dfe3e977e291add9696f40441422f9d606f (patch) | |
tree | a60557bbd76501e9f3602aec52754da8a7236247 | |
parent | ac87b166b8e16ca7f1ff58982365400b73ef614a (diff) | |
parent | f6247bc9637ac5da5bd7b2f8a13b09bb594c6128 (diff) | |
download | chef-b0f87dfe3e977e291add9696f40441422f9d606f.tar.gz |
Merge pull request #13361 from chef/jfm/hab_test
This update corrects the adhoc and release pipeline errors but not the habitat-test errors. Those are being investigated by Releng
-rw-r--r-- | omnibus/omnibus-test.ps1 | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/omnibus/omnibus-test.ps1 b/omnibus/omnibus-test.ps1 index aac620f5de..019d981e0c 100644 --- a/omnibus/omnibus-test.ps1 +++ b/omnibus/omnibus-test.ps1 @@ -1,7 +1,7 @@ # Stop script execution when a non-terminating error occurs $ErrorActionPreference = "Stop" -# install chocolatey +# install chocolatey function installChoco { if (!(Test-Path "$($env:ProgramData)\chocolatey\choco.exe")) { @@ -13,12 +13,12 @@ function installChoco { iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) } - catch { + catch { Write-Error $_.Exception.Message } } - else { + else { Write-Output "Chocolatey is already installed" } } @@ -26,7 +26,11 @@ function installChoco { installChoco # install powershell core -Invoke-WebRequest "https://github.com/PowerShell/PowerShell/releases/download/v7.0.3/PowerShell-7.0.3-win-x64.msi" -UseBasicParsing -OutFile powershell.msi +if ($PSVersionTable.PSVersion.Major -lt 7) { + $TLS12Protocol = [System.Net.SecurityProtocolType] 'Ssl3 , Tls12' + [System.Net.ServicePointManager]::SecurityProtocol = $TLS12Protocol +} +Invoke-WebRequest "https://github.com/PowerShell/PowerShell/releases/download/v7.3.0/PowerShell-7.3.0-win-x64.msi" -UseBasicParsing -OutFile powershell.msi Start-Process msiexec.exe -Wait -ArgumentList "/package PowerShell.msi /quiet" $env:path += ";C:\Program Files\PowerShell\7" |