fix: add not_supported_argument()

This commit is contained in:
zen0bit 2024-04-29 12:04:47 +02:00 committed by Martin Wimpress
parent 5026eaef06
commit 0da48d73b0

View File

@ -146,7 +146,7 @@ function show_os_info() {
while getopts ":12345" opt; do
case $opt in
1|2|3|4|5) os_info "${2}" | cut -d'|' -f${opt};;
*) echo "Wrong choice!" && exit 1;;
*) error_not_supported_argument;;
esac
done
}
@ -253,6 +253,13 @@ function error_not_supported_lang() {
exit 1
}
function error_not_supported_argument() {
echo "ERROR! Not supported argument"
echo "To see all possible arguments, use:"
echo " quickget -h or quickget --help"
exit 1
}
function handle_missing() {
# Handle odd missing Fedora combinations
case "${OS}" in
@ -3431,6 +3438,9 @@ case "${1}" in
'--list'|'-l')
list_supported
;;
-*)
error_not_supported_argument
;;
esac
if [ -n "${1}" ]; then