summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn McCrae <john.mccrae@progress.com>2022-10-30 10:31:05 +0600
committerJohn McCrae <john.mccrae@progress.com>2022-10-30 10:31:05 +0600
commitdd7d03f93c63a173fae95e706034cbecd2456056 (patch)
treed58911c7e0b5ee8549f180dfbcb086a979a18753
parentcc1b5c976afa247fd384e45fc9ec902dc157cfb2 (diff)
downloadchef-dd7d03f93c63a173fae95e706034cbecd2456056.tar.gz
Making Choco install Git - it doesn't show up at all now
Signed-off-by: John McCrae <john.mccrae@progress.com>
-rw-r--r--habitat/plan.ps117
1 files changed, 6 insertions, 11 deletions
diff --git a/habitat/plan.ps1 b/habitat/plan.ps1
index 10b9ca48f8..b3e8339e72 100644
--- a/habitat/plan.ps1
+++ b/habitat/plan.ps1
@@ -43,20 +43,15 @@ function Invoke-Download() {
# source is in this repo, so we're going to create an archive from the
# appropriate path within the repo and place the generated tarball in the
# location expected by do_unpack
- $env:Path = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User")
- $git_path = "c:\\Program Files\\Git\\bin"
- $env:Path = $git_path + ";" + [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User")
+ # $env:Path = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User")
+ # $git_path = "c:\\Program Files\\Git\\cmd"
+ # $env:Path = $git_path + ";" + [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User")
try {
- $output = Get-ChildItem -Path C:\ -File "git.exe" -Recurse -ErrorAction SilentlyContinue
- Write-Output "Here are the installed instances of Git"
- foreach($path in $output){
- Write-Output $path
- }
# Push-Location (Resolve-Path "$PLAN_CONTEXT/../").Path
# # Write-Output "`n *** Installing Choco *** `n"
- # # Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
- # # choco install gh -y
- # # choco install git -y
+ Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
+ choco install git -y
+ $env:Path = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User")
# $env:Path = $git_path + ";" + [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User")
# $full_git_path = $($git_path + "\git.exe")
# Write-Ouput "Is Git REALLY Installed? "