scripts: fix the scripts load-images.sh and save-images.sh in the case user provides invalid flags
When user provides an invalid flag, print out error message and help menu instead of looping forever Longhorn #1419 Signed-off-by: Phan Le <phan.le@rancher.com>
This commit is contained in:
parent
312ea9d54d
commit
c90ad4cf2b
@ -24,6 +24,11 @@ while [[ $# -gt 0 ]]; do
|
||||
help="true"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo "Error! invalid flag: ${key}"
|
||||
help="true"
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
@ -19,6 +19,11 @@ while [[ $# -gt 0 ]]; do
|
||||
help="true"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo "Error! invalid flag: ${key}"
|
||||
help="true"
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user