X-Git-Url: https://git.josue.xyz/?a=blobdiff_plain;f=golang%2Finstall.ps1;h=44a0db8e743cebe36d6a87be6137625980ac6b63;hb=49498cc112d812a87d011c7bcbbf810c779f72f7;hp=2de8ff8c97a2cdea99a45d1b592acca4832b80d9;hpb=b0fdda713fdcb8e2cd68e94dc97c73bd800fc206;p=webi-installers%2F.git diff --git a/golang/install.ps1 b/golang/install.ps1 index 2de8ff8..44a0db8 100644 --- a/golang/install.ps1 +++ b/golang/install.ps1 @@ -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..."