fix some $Env handling
[webi-installers/.git] / golang / install.ps1
index 2de8ff8c97a2cdea99a45d1b592acca4832b80d9..0ae4a62388195411f0139040b7589c79948ee10e 100644 (file)
@@ -11,7 +11,9 @@ $pkg_dst_bin = "$pkg_dst\bin"
 
 if (!(Get-Command "git.exe" -ErrorAction SilentlyContinue))
 {
-    & powershell -ExecutionPolicy Bypass "$Env:USERPROFILE\.local\bin\webi.ps1" git
+    & "$Env:USERPROFILE\.local\bin\webi.ps1" git
+    # because we need git.exe to be available to golang immediately
+    $Env:PATH = "$Env:USERPROFILE\.local\opt\git\cmd;$Env:PATH"
 }
 
 # Fetch archive