mirror of
https://github.com/alirezarezvani/ClaudeForge.git
synced 2026-07-04 02:43:15 -04:00
fix(installer): Read user input from /dev/tty for piped execution
- Fixed infinite loop when running via curl | bash - All interactive prompts now read from /dev/tty instead of stdin - Fixes installation choice, confirmation, and quality hooks prompts - Ensures user input works correctly when script is piped through bash
This commit is contained in:
+3
-3
@@ -89,7 +89,7 @@ echo " ${GREEN}2)${NC} Project-level (./.claude/) - Available only in current
|
|||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
read -p "$(echo -e ${BLUE}Enter choice [1/2]:${NC} )" choice
|
read -p "$(echo -e ${BLUE}Enter choice [1/2]:${NC} )" choice < /dev/tty
|
||||||
case $choice in
|
case $choice in
|
||||||
1)
|
1)
|
||||||
SKILLS_DIR="$HOME/.claude/skills"
|
SKILLS_DIR="$HOME/.claude/skills"
|
||||||
@@ -121,7 +121,7 @@ echo " • Agent: $AGENTS_DIR/claude-md-guardian.md"
|
|||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
# Confirm installation
|
# Confirm installation
|
||||||
read -p "$(echo -e ${BLUE}Proceed with installation? [Y/n]:${NC} )" confirm
|
read -p "$(echo -e ${BLUE}Proceed with installation? [Y/n]:${NC} )" confirm < /dev/tty
|
||||||
confirm=${confirm:-Y}
|
confirm=${confirm:-Y}
|
||||||
|
|
||||||
if [[ ! $confirm =~ ^[Yy]$ ]]; then
|
if [[ ! $confirm =~ ^[Yy]$ ]]; then
|
||||||
@@ -168,7 +168,7 @@ print_success "Agent installed → $AGENTS_DIR/claude-md-guardian.md"
|
|||||||
|
|
||||||
# Optional: Install quality hooks
|
# Optional: Install quality hooks
|
||||||
echo ""
|
echo ""
|
||||||
read -p "$(echo -e ${BLUE}Would you like to install quality hooks (pre-commit validation)? [y/N]:${NC} )" install_hooks
|
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}
|
install_hooks=${install_hooks:-N}
|
||||||
|
|
||||||
if [[ $install_hooks =~ ^[Yy]$ ]]; then
|
if [[ $install_hooks =~ ^[Yy]$ ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user