Compare commits

...
1 Commits
Author SHA1 Message Date
bart ed27a09ef9 Fix interactive terminal prompt via /dev/tty for piped curl 2026-10-20 21:43:38 +02:00
+11
View File
@@ -26,13 +26,24 @@ REPO_USER="${1:-}"
REPO_PASS="${2:-}"
if [ -z "$REPO_USER" ]; then
if [ -t 0 ]; then
read -r -p "Gebruikersnaam voor repository [eendoe]: " INPUT_USER
elif [ -e /dev/tty ]; then
read -r -p "Gebruikersnaam voor repository [eendoe]: " INPUT_USER </dev/tty
else
INPUT_USER=""
fi
REPO_USER="${INPUT_USER:-eendoe}"
fi
if [ -z "$REPO_PASS" ]; then
if [ -t 0 ]; then
read -r -s -p "Wachtwoord voor repository ($REPO_USER): " REPO_PASS
echo ""
elif [ -e /dev/tty ]; then
read -r -s -p "Wachtwoord voor repository ($REPO_USER): " REPO_PASS </dev/tty
echo ""
fi
fi
if [ -z "$REPO_USER" ] || [ -z "$REPO_PASS" ]; then