Root Cause: When script is executed via `curl | bash`, the prompt text
from `read -p "prompt"` is not displayed. The user sees nothing and
thinks the script is stuck/hanging, when it's actually waiting for input.
Solution: Use explicit `echo` statements for prompts instead of `read -p`:
Before (prompt hidden):
read -p "Launch coding-helper wizard now? [y/N] " -n 1 -r var < /dev/tty
After (prompt visible):
echo -e "${CYAN}Launch coding-helper wizard now?${NC} ${GREEN}[Y/n]${NC}"
>&2 echo -en "\033[0;36m> \033[0m"
read -n 1 -r var < /dev/tty 2>/dev/null || var="Y"
The key changes:
1. Echo the prompt text explicitly before calling read
2. Use >&2 to send to stderr (bypasses pipe)
3. Show visual indicator "> " using stderr
4. read command now just waits for input (no -p flag)
5. Default to "Y" if read fails (makes script usable non-interactively)
Fixed 5 wizard launch prompts:
- Line 652: All components installed case
- Line 668: Partial components case
- Line 697: Already installed case
- Line 724: Normal install success case
- Line 775: Sudo install success case
All now show:
Launch coding-helper wizard now? [Y/n]
>
And wait for user input with visible prompt.
Co-Authored-By: Claude <noreply@anthropic.com>
38 KiB
Executable File
38 KiB
Executable File