diff options
author | John McCrae <john.mccrae@progress.com> | 2022-10-19 18:46:35 +0600 |
---|---|---|
committer | John McCrae <john.mccrae@progress.com> | 2022-10-20 16:34:53 +0600 |
commit | e41fad5de32f78d89f60e18af75ad1250d745888 (patch) | |
tree | 88eb9a8d3b4107c50356be90f976ad78cbaacc87 | |
parent | b0f6b854ffeadaa8384343495297554c6cb2ac9e (diff) | |
download | chef-e41fad5de32f78d89f60e18af75ad1250d745888.tar.gz |
Correcting for Hab not being installed
Signed-off-by: John McCrae <john.mccrae@progress.com>
-rw-r--r-- | .expeditor/scripts/ensure-minimum-viable-hab.ps1 | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/.expeditor/scripts/ensure-minimum-viable-hab.ps1 b/.expeditor/scripts/ensure-minimum-viable-hab.ps1 index 132dd72ab8..2a27c4c8f6 100644 --- a/.expeditor/scripts/ensure-minimum-viable-hab.ps1 +++ b/.expeditor/scripts/ensure-minimum-viable-hab.ps1 @@ -4,6 +4,7 @@ try { Write-Host "--- :habicat: Installing the version of Habitat required" Set-ExecutionPolicy Bypass -Scope Process -Force Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/habitat-sh/habitat/main/components/hab/install.ps1')) + $env:Path = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User") if (-not $?) { throw "Hab version is older than 0.85 and could not update it." } } else { Write-Host "--- :habicat: :thumbsup: Minimum required version of Habitat already installed" @@ -14,5 +15,6 @@ catch { Write-Host "--- :habicat: Installing the version of Habitat required" Set-ExecutionPolicy Bypass -Scope Process -Force Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/habitat-sh/habitat/main/components/hab/install.ps1')) + $env:Path = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User") } -$env:Path = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User") + |