Fix: set short TEMP/GOCACHE paths to avoid Windows error 87 (Falscher Parameter)

This commit is contained in:
2026-05-11 09:00:05 +02:00
parent 4ef27e2624
commit 2c53125298
+7
View File
@@ -96,6 +96,13 @@ Expand-Archive -Path $srcZip -DestinationPath $srcDir -Force
$repoDir = (Get-ChildItem $srcDir -Directory | Select-Object -First 1).FullName $repoDir = (Get-ChildItem $srcDir -Directory | Select-Object -First 1).FullName
Write-Host " Kompiliere upterm (GOTOOLCHAIN=auto, laedt ggf. neueres Go)..." 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 Push-Location $repoDir
$env:GOTOOLCHAIN = "auto" $env:GOTOOLCHAIN = "auto"
& $goExe build -o "$env:GOPATH\bin\upterm.exe" ./cmd/upterm 2>&1 | ForEach-Object { Write-Host " $_" } & $goExe build -o "$env:GOPATH\bin\upterm.exe" ./cmd/upterm 2>&1 | ForEach-Object { Write-Host " $_" }