mirror of
https://github.com/helm/helm.git
synced 2026-06-30 19:57:48 +00:00
Avoid confusing error when passing in '--version X.Y.Z'
fixes #11578 Signed-off-by: Justin Wood <jwood@starry.com>
This commit is contained in:
@@ -207,6 +207,10 @@ while [[ $# -gt 0 ]]; do
|
||||
shift
|
||||
if [[ $# -ne 0 ]]; then
|
||||
export DESIRED_VERSION="${1}"
|
||||
if [[ "$1" != "v"* ]]; then
|
||||
echo "Expected version arg ('${DESIRED_VERSION}') to begin with 'v', fixing..."
|
||||
export DESIRED_VERSION="v${1}"
|
||||
fi
|
||||
else
|
||||
echo -e "Please provide the desired version. e.g. --version v2.4.0 or -v latest"
|
||||
exit 0
|
||||
|
||||
@@ -299,6 +299,10 @@ while [[ $# -gt 0 ]]; do
|
||||
shift
|
||||
if [[ $# -ne 0 ]]; then
|
||||
export DESIRED_VERSION="${1}"
|
||||
if [[ "$1" != "v"* ]]; then
|
||||
echo "Expected version arg ('${DESIRED_VERSION}') to begin with 'v', fixing..."
|
||||
export DESIRED_VERSION="v${1}"
|
||||
fi
|
||||
else
|
||||
echo -e "Please provide the desired version. e.g. --version v3.0.0 or -v canary"
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user