Skip to content

Commit

Permalink
fix: requesting --help is not an error
Browse files Browse the repository at this point in the history
  • Loading branch information
flexiondotorg committed Jul 2, 2024
1 parent 66dfa64 commit 8cf007f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions quickemu
Original file line number Diff line number Diff line change
Expand Up @@ -1633,7 +1633,6 @@ function usage() {
echo " --sound-duplex <type> : Set sound card duplex. @Options: 'hda-micro' (default: speaker/mic), 'hda-duplex' (line-in/line-out), 'hda-output' (output-only)"
echo " --extra_args <arguments> : Pass additional arguments to qemu"
echo " --version : Print version"
exit 1
}

function display_param_check() {
Expand Down Expand Up @@ -1921,6 +1920,7 @@ fi
# Take command line arguments
if [ $# -lt 1 ]; then
usage
exit 1
else
while [ $# -gt 0 ]; do
case "${1}" in
Expand Down Expand Up @@ -2066,10 +2066,12 @@ else
echo "${VERSION}"
exit;;
-h|--h|-help|--help)
usage;;
usage
exit 0;;
*)
echo "ERROR! \"${1}\" is not a supported parameter."
usage;;
usage
exit 1;;
esac
done
fi
Expand Down Expand Up @@ -2134,12 +2136,14 @@ if [ -n "${VM}" ] && [ -e "${VM}" ]; then
exit;;
*)
echo "ERROR! \"${SNAPSHOT_ACTION}\" is not a supported snapshot action."
usage;;
usage
exit 1;;
esac
fi
else
echo "ERROR! Virtual machine configuration not found."
usage
exit 1
fi

display_param_check
Expand Down

0 comments on commit 8cf007f

Please sign in to comment.