Skip to content

Commit

Permalink
Merge pull request helm#2899 from hchenxa/hchenxa
Browse files Browse the repository at this point in the history
fix unbound variable issue when get version
  • Loading branch information
Matthew Fisher authored Sep 13, 2017
2 parents 33ad8ca + 895e8d0 commit 87dd64c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions scripts/get
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,14 @@ export INPUT_ARGUMENTS="${@}"
set -u
while [[ $# -gt 0 ]]; do
case $1 in
'--version'|-v)
export DESIRED_VERSION="${2}"
'--version'|-v)
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
Expand Down

0 comments on commit 87dd64c

Please sign in to comment.