diff --git a/config.sh b/config.sh index 4c00cff7..2afd2ace 100755 --- a/config.sh +++ b/config.sh @@ -32,6 +32,19 @@ else RED='' GREEN='' YELLOW='' BLUE='' CYAN='' BOLD='' DIM='' NC='' fi +# ============================================================================= +# Ensure stdin is connected to the terminal (handles curl | bash case) +# ============================================================================= +if [[ ! -t 0 ]]; then + if [[ -e /dev/tty ]]; then + exec 0&2 + echo " Download and run manually: bash config.sh" >&2 + exit 1 + fi +fi + # ============================================================================= # Utility Functions # ============================================================================= diff --git a/scripts/install.sh b/scripts/install.sh index 9187ec87..765a453e 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -224,7 +224,13 @@ echo "" echo -e "${BOLD}Starting configuration wizard...${NC}" echo "" cd "$INSTALL_DIR" -bash config.sh +# Redirect stdin from terminal — when piped (curl | bash), stdin is the pipe, +# so interactive prompts in config.sh would read garbage instead of user input. +if [[ -e /dev/tty ]]; then + bash config.sh