Fix missconfigured pipe detection and getopts.

This commit is contained in:
Kevin Baensch 2023-04-26 13:30:41 +02:00
parent 801e735379
commit fda1f76cc5

View file

@ -18,7 +18,7 @@ SUBCOMMAND LIST:
-c\tRun SQL on CLI instead of GUI" -c\tRun SQL on CLI instead of GUI"
# Detect Pipe # Detect Pipe
if ! [ -t 1 ] if ! [ -t 0 ]
then then
USE_CLI=true USE_CLI=true
fi fi
@ -193,7 +193,7 @@ case "${MAIN_OPTION}" in
exit 1 exit 1
fi fi
while getopts "u:p:d:c:" o while getopts "u:p:d:c" o
do do
case "$o" in case "$o" in
u) TARGET_HOST_USERNAME="${OPTARG}" ;; u) TARGET_HOST_USERNAME="${OPTARG}" ;;