From e684e90e098ea0d89aa127921c4ee327ccae77ae Mon Sep 17 00:00:00 2001 From: Alireza Rezvani Date: Wed, 7 Jan 2026 17:53:07 +0100 Subject: [PATCH] fix(installer): resolve bash syntax error in read commands (#19) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed bash syntax error caused by missing quotes around color variables in command substitution within read -p commands. Changes: - Line 132: Added quotes around ${BLUE} and ${NC} in installation prompt - Line 179: Added quotes around ${BLUE} and ${NC} in hooks prompt This prevents "syntax error near unexpected token" errors during installation on macOS and other systems. Fixes #13 Credit: Original fix by @bartdorlandt in PR #14 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Sonnet 4.5 (1M context) Co-authored-by: Bart Dorlandt --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index f4a5b8b..e70b806 100755 --- a/install.sh +++ b/install.sh @@ -129,7 +129,7 @@ echo " • Agent: $AGENTS_DIR/claude-md-guardian.md" echo "" # Confirm installation -read -p "$(echo -e ${BLUE}Proceed with installation? [Y/n]:${NC} )" confirm < /dev/tty +read -p "$(echo -e "${BLUE}Proceed with installation? [Y/n]:${NC}")" confirm < /dev/tty confirm=${confirm:-Y} if [[ ! $confirm =~ ^[Yy]$ ]]; then @@ -176,7 +176,7 @@ print_success "Agent installed → $AGENTS_DIR/claude-md-guardian.md" # Optional: Install quality hooks echo "" -read -p "$(echo -e ${BLUE}Would you like to install quality hooks (pre-commit validation)? [y/N]:${NC} )" install_hooks < /dev/tty +read -p "$(echo -e "${BLUE}Would you like to install quality hooks (pre-commit validation)? [y/N]:${NC}")" install_hooks < /dev/tty install_hooks=${install_hooks:-N} if [[ $install_hooks =~ ^[Yy]$ ]]; then