From ddb0ef565618affb22638506357c32066f94fba2 Mon Sep 17 00:00:00 2001 From: yyy900 <67774353+yyy900@users.noreply.github.com> Date: Fri, 29 May 2026 02:05:16 +1000 Subject: [PATCH] Fix Windows install: route Git Bash to PS1, pin tar to Windows bsdtar install.sh treated Git Bash as an unsupported platform: `uname -s` returns MINGW64_NT-... which fell through to the error branch. Add a MINGW*/MSYS*/CYGWIN* case that points Windows users at the PowerShell installer instead. install.ps1 ran `tar -xzf` against paths like C:\Users\...; a GNU tar from Git Bash on PATH parses the "C:" as a remote host (tar: Cannot connect to C: resolve failed). Pin extraction to Windows' bundled bsdtar at System32\tar.exe, which handles drive letters. Co-Authored-By: Claude Opus 4.7 (1M context) --- install.ps1 | 5 ++++- install.sh | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/install.ps1 b/install.ps1 index eed8919..8c8fd70 100644 --- a/install.ps1 +++ b/install.ps1 @@ -48,7 +48,10 @@ if (-not (Test-Path $CoPy)) { $tarball = Join-Path $CoEnv $asset Invoke-WebRequest -Uri $url -OutFile $tarball -UseBasicParsing # tarball contains a top-level "python\" directory. - tar -xzf $tarball -C $CoEnv + # GNU tar from Git Bash on PATH parses the "C:" as a remote host; pin to Windows' bsdtar. + $tarExe = Join-Path $env:SystemRoot 'System32\tar.exe' + if (-not (Test-Path $tarExe)) { $tarExe = 'tar' } + & $tarExe -xzf $tarball -C $CoEnv Remove-Item -Force $tarball if (-not (Test-Path $CoPy)) { Write-Fail "python bootstrap failed: $CoPy not found after extract" } } diff --git a/install.sh b/install.sh index 728c81c..88594f6 100755 --- a/install.sh +++ b/install.sh @@ -37,6 +37,10 @@ if [ ! -x "$CO_PY" ]; then case "$uname_s" in Darwin) TRIPLE="$ARCH-apple-darwin" ;; Linux) TRIPLE="$ARCH-unknown-linux-gnu" ;; + MINGW*|MSYS*|CYGWIN*) + red "Windows detected (Git Bash/MSYS). Use the PowerShell installer instead:" + red ' irm https://raw.githubusercontent.com/openonion/oo/main/install.ps1 | iex' + exit 1 ;; *) red "unsupported platform: $uname_s/$uname_m"; exit 1 ;; esac ASSET="cpython-${PBS_PYTHON}+${PBS_RELEASE}-${TRIPLE}-install_only.tar.gz"