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"