fix: use Windows-compatible default path for CLI installation (#5221)

Signed-off-by: aegntic <research@aegntic.ai>
Co-authored-by: aegntic <research@aegntic.ai>
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
aegntic
2025-10-22 06:39:34 +11:00
committed by GitHub
parent 5a35f0952e
commit 13314515bb
+17 -1
View File
@@ -54,7 +54,23 @@ fi
# --- 2) Variables ---
REPO="block/goose"
OUT_FILE="goose"
GOOSE_BIN_DIR="${GOOSE_BIN_DIR:-"$HOME/.local/bin"}"
# Set default bin directory based on detected OS environment
if [[ "${WINDIR:-}" ]] || [[ "${windir:-}" ]] || [[ "$OSTYPE" == "msys" ]] || [[ "$OSTYPE" == "cygwin" ]]; then
# Native Windows environments - use Windows user profile path
DEFAULT_BIN_DIR="$USERPROFILE/goose"
elif [[ -f "/proc/version" ]] && grep -q "Microsoft\|WSL" /proc/version 2>/dev/null; then
# WSL - use Linux-style path but make sure it exists
DEFAULT_BIN_DIR="$HOME/.local/bin"
elif [[ "$PWD" =~ ^/mnt/[a-zA-Z]/ ]]; then
# WSL mount point detection
DEFAULT_BIN_DIR="$HOME/.local/bin"
else
# Default for Linux/macOS
DEFAULT_BIN_DIR="$HOME/.local/bin"
fi
GOOSE_BIN_DIR="${GOOSE_BIN_DIR:-$DEFAULT_BIN_DIR}"
RELEASE="${CANARY:-false}"
CONFIGURE="${CONFIGURE:-true}"
if [ -n "${GOOSE_VERSION:-}" ]; then