summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Powell <powell@progress.com>2022-10-28 14:40:50 -0400
committerThomas Powell <powell@progress.com>2022-10-28 14:40:50 -0400
commitfce61f2cd718ca3de35e0d5b1b146e5bdd05afcc (patch)
tree653c8e95fc7a9229fee22addc96e6db3e11b21b0
parent6c9edf77df08a99d39c8bac87c9b7387ee296f8a (diff)
downloadchef-fce61f2cd718ca3de35e0d5b1b146e5bdd05afcc.tar.gz
Debug choco and git install
Signed-off-by: Thomas Powell <powell@progress.com>
-rw-r--r--habitat/plan.ps115
1 files changed, 10 insertions, 5 deletions
diff --git a/habitat/plan.ps1 b/habitat/plan.ps1
index 6eac4ece4b..cb501749fe 100644
--- a/habitat/plan.ps1
+++ b/habitat/plan.ps1
@@ -44,21 +44,26 @@ function Invoke-Download() {
# location expected by do_unpack
Write-Host "--- :construction: Verifying Git is Installed"
+ $env:Path = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User")
try {
- $env:Path = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User")
$source = Get-Command -Name Choco -Verbose -ErrorAction Stop
Write-Host "Choco version " $source.version
+ } catch {
+ Write-Host "Couldn't find choco!!"
+ }
+ try {
$source = Get-Command -Name Git -Verbose -ErrorAction Stop
Write-Host "Which version of Git is installed? - " $source.version
} catch {
- try {
+ Write-Host "Couldn't find git!!"
+ try {
choco install git -y
# gotta refresh the path so you can actually use Git now
$env:Path = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User")
- } catch {
- Write-Host "choco seems to have errored?!"
- }
+ } catch {
+ Write-Host "choco seems to have errored?!"
+ }
}
try {