From dafb8d9606f186f7993b9cfa00e1f9fefb75cd0c Mon Sep 17 00:00:00 2001 From: Ralf-Peter Wolff Date: Mon, 4 May 2026 14:21:20 +0200 Subject: [PATCH] Fix: install git before upterm bucket, verify upterm.exe after install --- setup-windows.ps1 | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/setup-windows.ps1 b/setup-windows.ps1 index 88500d6..d44d874 100644 --- a/setup-windows.ps1 +++ b/setup-windows.ps1 @@ -128,13 +128,30 @@ if (-not $7zipOk) { } Write-Host " OK" -# 4. upterm +# 4. upterm (git wird fuer Scoop-Buckets benoetigt) Write-Host "[4/4] Installiere upterm..." -try { scoop bucket add upterm https://github.com/owenthereal/scoop-upterm } catch {} -try { - scoop install upterm -} catch { - Write-Host "FEHLER: upterm Installation fehlgeschlagen: $_" + +# git pruefen / installieren +if (-not (Get-Command git -ErrorAction SilentlyContinue)) { + Write-Host " git nicht gefunden - wird installiert..." + scoop install git + # PATH aktualisieren + $gitShim = "$env:USERPROFILE\scoop\shims" + if ($env:PATH -notlike "*$gitShim*") { $env:PATH = "$env:PATH;$gitShim" } + if (-not (Get-Command git -ErrorAction SilentlyContinue)) { + Write-Host "FEHLER: git Installation fehlgeschlagen." + Read-Host "Enter zum Beenden"; exit 1 + } + Write-Host " git installiert." +} else { + Write-Host " git bereits vorhanden." +} + +scoop bucket add upterm https://github.com/owenthereal/scoop-upterm 2>&1 | Out-Null +scoop install upterm 2>&1 | Tee-Object -Variable scoopOut +if (-not (Get-Command upterm -ErrorAction SilentlyContinue)) { + Write-Host "FEHLER: upterm wurde nicht installiert." + Write-Host $scoopOut Read-Host "Enter zum Beenden"; exit 1 } Write-Host " OK"