Problem
tools/ways-cli/download-ways.sh uses uname -s for platform detection, which returns mingw64_nt-10.0-26200 on Git Bash for Windows instead of the expected windows. This causes the script to look for a binary named ways-mingw64_nt-10.0-26200-x86_64, which doesn't exist in the release, even though ways-windows-x86_64.exe is available.
Observed behavior:
Platform: mingw64_nt-10.0-26200-x86_64
Release: ways-v0.3.1
No pre-built binary for mingw64_nt-10.0-26200-x86_64 in release ways-v0.3.1.
Expected behavior: Script detects Windows and downloads ways-windows-x86_64.exe.
Fix
Add Windows normalization in the platform detection block:
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
# Normalize Windows environments (Git Bash, MSYS2, Cygwin)
case "$OS" in
mingw*|msys*|cygwin*) OS="windows" ;;
esac
ARCH=$(uname -m | sed 's/arm64/aarch64/')
PLATFORM="${OS}-${ARCH}"
Also update OUTPUT_FILE to append .exe on Windows:
EXE_EXT=""
[[ "$OS" == "windows" ]] && EXE_EXT=".exe"
OUTPUT_FILE="${OUTPUT_DIR}/ways${EXE_EXT}"
Environment
- Windows 11 Home 10.0.26200
- Git Bash (mingw64)
gh CLI v2.89.0
- No WSL, no Rust toolchain
Problem
tools/ways-cli/download-ways.shusesuname -sfor platform detection, which returnsmingw64_nt-10.0-26200on Git Bash for Windows instead of the expectedwindows. This causes the script to look for a binary namedways-mingw64_nt-10.0-26200-x86_64, which doesn't exist in the release, even thoughways-windows-x86_64.exeis available.Observed behavior:
Expected behavior: Script detects Windows and downloads
ways-windows-x86_64.exe.Fix
Add Windows normalization in the platform detection block:
Also update
OUTPUT_FILEto append.exeon Windows:Environment
ghCLI v2.89.0