From ed4520ecd2181d9d1798ac1f7ad92a69625e4941 Mon Sep 17 00:00:00 2001 From: sehawq Date: Sat, 14 Mar 2026 17:58:25 +0300 Subject: [PATCH] feat: guard Windows bash without cygpath --- cli-anything-plugin/scripts/setup-cli-anything.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/cli-anything-plugin/scripts/setup-cli-anything.sh b/cli-anything-plugin/scripts/setup-cli-anything.sh index 385359321..79d8b344a 100755 --- a/cli-anything-plugin/scripts/setup-cli-anything.sh +++ b/cli-anything-plugin/scripts/setup-cli-anything.sh @@ -10,6 +10,20 @@ YELLOW='\033[1;33m' BLUE='\033[0;34m' NC='\033[0m' # No Color +# Windows bash environment check (helps avoid cryptic cygpath errors later) +is_windows_bash() { + case "$(uname -s 2>/dev/null)" in + CYGWIN*|MINGW*|MSYS*) return 0 ;; + esac + return 1 +} + +if is_windows_bash && ! command -v cygpath >/dev/null 2>&1; then + echo -e "${RED}✗${NC} Windows bash environment detected but 'cygpath' was not found." + echo -e "${YELLOW} Please install Git for Windows (Git Bash) or use WSL, then rerun this script.${NC}" + exit 1 +fi + # Plugin info PLUGIN_NAME="cli-anything" PLUGIN_VERSION="1.0.0"