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
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..."