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:
+17
-1
@@ -54,7 +54,23 @@ fi
|
|||||||
# --- 2) Variables ---
|
# --- 2) Variables ---
|
||||||
REPO="block/goose"
|
REPO="block/goose"
|
||||||
OUT_FILE="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}"
|
RELEASE="${CANARY:-false}"
|
||||||
CONFIGURE="${CONFIGURE:-true}"
|
CONFIGURE="${CONFIGURE:-true}"
|
||||||
if [ -n "${GOOSE_VERSION:-}" ]; then
|
if [ -n "${GOOSE_VERSION:-}" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user