From b684fa49353b48221d30e8d25583062341fdb300 Mon Sep 17 00:00:00 2001 From: "Calvin A. Allen" Date: Mon, 12 Jan 2026 11:14:04 -0500 Subject: [PATCH] fix(runner): recognize MINGW/MSYS/CYGWIN as Windows in wrapper script The Unix wrapper script now properly detects Git Bash, MSYS2, and Cygwin environments as Windows and uses the correct Windows binary with .exe extension. Closes #45 --- DESIGN.md | 4 +++- src/commands/init.rs | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/DESIGN.md b/DESIGN.md index 22bccb8..cbef937 100644 --- a/DESIGN.md +++ b/DESIGN.md @@ -68,9 +68,11 @@ set -e # Detect OS OS=$(uname -s | tr '[:upper:]' '[:lower:]') +EXT="" case "$OS" in linux*) OS="linux" ;; darwin*) OS="macos" ;; + mingw*|msys*|cygwin*) OS="windows"; EXT=".exe" ;; *) echo "Error: Unsupported OS: $OS" >&2; exit 1 ;; esac @@ -82,7 +84,7 @@ case "$ARCH" in *) echo "Error: Unsupported architecture: $ARCH" >&2; exit 1 ;; esac -BINARY="$(dirname "$0")/.rnr/bin/rnr-${OS}-${ARCH}" +BINARY="$(dirname "$0")/.rnr/bin/rnr-${OS}-${ARCH}${EXT}" if [ ! -f "$BINARY" ]; then echo "Error: rnr is not configured for ${OS}-${ARCH}." >&2 diff --git a/src/commands/init.rs b/src/commands/init.rs index 4949885..422074e 100644 --- a/src/commands/init.rs +++ b/src/commands/init.rs @@ -264,9 +264,11 @@ set -e # Detect OS OS=$(uname -s | tr '[:upper:]' '[:lower:]') +EXT="" case "$OS" in linux*) OS="linux" ;; darwin*) OS="macos" ;; + mingw*|msys*|cygwin*) OS="windows"; EXT=".exe" ;; *) echo "Error: Unsupported OS: $OS" >&2; exit 1 ;; esac @@ -278,7 +280,7 @@ case "$ARCH" in *) echo "Error: Unsupported architecture: $ARCH" >&2; exit 1 ;; esac -BINARY="$(dirname "$0")/.rnr/bin/rnr-${OS}-${ARCH}" +BINARY="$(dirname "$0")/.rnr/bin/rnr-${OS}-${ARCH}${EXT}" if [ ! -f "$BINARY" ]; then echo "Error: rnr is not configured for ${OS}-${ARCH}." >&2