Merge pull request #2899 from hchenxa/hchenxa

fix unbound variable issue when get version
pull/2929/head
Matthew Fisher 7 years ago committed by GitHub
commit 87dd64c2fd

@ -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

Loading…
Cancel
Save