Fix: set short TEMP/GOCACHE paths to avoid Windows error 87 (Falscher Parameter)
This commit is contained in:
@@ -96,6 +96,13 @@ Expand-Archive -Path $srcZip -DestinationPath $srcDir -Force
|
||||
$repoDir = (Get-ChildItem $srcDir -Directory | Select-Object -First 1).FullName
|
||||
|
||||
Write-Host " Kompiliere upterm (GOTOOLCHAIN=auto, laedt ggf. neueres Go)..."
|
||||
# Kurze Temp-Pfade setzen (langer Benutzerpfad kann Windows-Fehler 87 ausloesen)
|
||||
New-Item -ItemType Directory -Force -Path "C:\GoTemp" | Out-Null
|
||||
New-Item -ItemType Directory -Force -Path "C:\GoCache" | Out-Null
|
||||
$env:TEMP = "C:\GoTemp"
|
||||
$env:TMP = "C:\GoTemp"
|
||||
$env:GOCACHE = "C:\GoCache"
|
||||
$env:GOTMPDIR = "C:\GoTemp"
|
||||
Push-Location $repoDir
|
||||
$env:GOTOOLCHAIN = "auto"
|
||||
& $goExe build -o "$env:GOPATH\bin\upterm.exe" ./cmd/upterm 2>&1 | ForEach-Object { Write-Host " $_" }
|
||||
|
||||
Reference in New Issue
Block a user