include godoc, duh
[webi-installers/.git] / golang / install.ps1
index 2de8ff8c97a2cdea99a45d1b592acca4832b80d9..44a0db8e743cebe36d6a87be6137625980ac6b63 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
@@ -52,7 +54,7 @@ IF (!(Test-Path -Path "$pkg_src"))
 echo "Copying into '$pkg_dst' from '$pkg_src'"
 Remove-Item -Path "$pkg_dst" -Recurse -ErrorAction Ignore
 Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse
-IF (!(Test-Path -Path go\bin)) { New-Item -Path go\bin -ItemType Directory }
+IF (!(Test-Path -Path go\bin)) { New-Item -Path go\bin -ItemType Directory -Force }
 
 # Special to go: re-run all go tooling builds
 echo "Building go language tools..."