summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.expeditor/scripts/ensure-minimum-viable-hab.ps19
1 files changed, 7 insertions, 2 deletions
diff --git a/.expeditor/scripts/ensure-minimum-viable-hab.ps1 b/.expeditor/scripts/ensure-minimum-viable-hab.ps1
index 45729d34ec..b764524a24 100644
--- a/.expeditor/scripts/ensure-minimum-viable-hab.ps1
+++ b/.expeditor/scripts/ensure-minimum-viable-hab.ps1
@@ -3,8 +3,9 @@ try {
if ($hab_version -lt [Version]"0.85.0" ) {
Write-Host "--- :habicat: Installing the version of Habitat required"
Write-Host "What version of Windows and PowerShell is this?`n"
- Write-Host "`n"
$PSVersionTable
+ Write-Host "`n"
+ Write-Host "This is the OS Version"
[System.Environment]::OSVersion
Write-Host "What version of Hab is this? $((hab --version).split(" ")[1].split("/")[0])"
Write-Host "`n"
@@ -12,6 +13,9 @@ try {
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")
+ $test_output = Get-ChildItem -path c:\ -File "hab.exe" -Recurse
+ Write-Host "Here's Hab`n"
+ Write-Host $test_output
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"
@@ -23,13 +27,14 @@ catch {
$PSVersionTable
[System.Environment]::OSVersion
Write-Host "`n"
+ Write-Host "Looking for Hab in all the wrong places"
Get-Command Hab
Write-Host "`n"
# This install fails if Hab isn't on the path when we check for the version. This ensures it is installed
Write-Host "--- :habicat: Forcing an install of habitat"
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'))
- $test_output = gci -path c:\ -File "hab.exe"
+ $test_output = Get-ChildItem -path c:\ -File "hab.exe" -Recurse
Write-Host "Here's Hab`n"
Write-Host $test_output
$env:Path = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User") + ";C:\ProgramData\Habitat\"