Commit 895e8d08 authored by Hui Chen's avatar Hui Chen

fix unbound variable issue when get version

parent 5ed2d6bd
...@@ -191,9 +191,14 @@ export INPUT_ARGUMENTS="${@}" ...@@ -191,9 +191,14 @@ export INPUT_ARGUMENTS="${@}"
set -u set -u
while [[ $# -gt 0 ]]; do while [[ $# -gt 0 ]]; do
case $1 in case $1 in
'--version'|-v) '--version'|-v)
export DESIRED_VERSION="${2}"
shift shift
if [[ $# -ne 0 ]]; then
export DESIRED_VERSION="${1}"
else
echo -e "Please provide the desired version. e.g. --version v2.4.0 or -v latest"
exit 0
fi
;; ;;
'--help'|-h) '--help'|-h)
help help
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment