Skip to content

Commit e390b89

Browse files
committed
Fix interactive prompts when script is piped via curl
1 parent 8623b82 commit e390b89

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

scripts/deploy-external-speedtest.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ else
8686
echo " back to a private network address unless the page is served over HTTPS."
8787
echo " Examples: https://optimizer.example.com, https://192.168.1.100:8042"
8888
echo ""
89-
read -rp "Optimizer URL: " OPTIMIZER_URL
89+
read -rp "Optimizer URL: " OPTIMIZER_URL < /dev/tty
9090
if [ -z "$OPTIMIZER_URL" ]; then
9191
echo "Error: Optimizer URL is required."
9292
exit 1
@@ -99,7 +99,7 @@ else
9999
echo " Use something short that describes where this server is located."
100100
echo " Examples: vps-chicago, aws-east, hetzner-eu"
101101
echo ""
102-
read -rp "Server name: " SERVER_NAME
102+
read -rp "Server name: " SERVER_NAME < /dev/tty
103103
if [ -z "$SERVER_NAME" ]; then
104104
echo "Error: Server name is required."
105105
exit 1
@@ -108,7 +108,7 @@ else
108108
echo ""
109109

110110
# Port
111-
read -rp "Port [3005]: " PORT
111+
read -rp "Port [3005]: " PORT < /dev/tty
112112
PORT="${PORT:-3005}"
113113

114114
echo ""

0 commit comments

Comments
 (0)