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"
# Detect Pipe
if ! [ -t 1 ]
if ! [ -t 0 ]
then
USE_CLI=true
fi
@ -193,7 +193,7 @@ case "${MAIN_OPTION}" in
exit 1
fi
while getopts "u:p:d:c:" o
while getopts "u:p:d:c" o
do
case "$o" in
u) TARGET_HOST_USERNAME="${OPTARG}" ;;