From 13478032288e38884e678f4f7467f71db299ac4a Mon Sep 17 00:00:00 2001 From: Patrice Ferlet Date: Thu, 17 Dec 2020 17:16:22 +0100 Subject: [PATCH] Prefix USE_SUDO with HELM_INSTALL Because we probably want to set HELM_INSTALL_DIR and USE_SUDO in our `.bashrc` file, the variable name `USE_SUDO` is too wide. It's safier to use `HELM_INSTALL_USE_SUDO`. Signed-off-by: Patrice Ferlet --- scripts/get-helm-3 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/get-helm-3 b/scripts/get-helm-3 index 08d0e14ca..15665737b 100755 --- a/scripts/get-helm-3 +++ b/scripts/get-helm-3 @@ -18,7 +18,7 @@ # the package manager for Go: https://github.com/Masterminds/glide.sh/blob/master/get : ${BINARY_NAME:="helm"} -: ${USE_SUDO:="true"} +: ${HELM_INSTALL_USE_SUDO:="true"} : ${DEBUG:="false"} : ${VERIFY_CHECKSUM:="true"} : ${VERIFY_SIGNATURES:="false"} @@ -58,7 +58,7 @@ initOS() { runAsRoot() { local CMD="$*" - if [ $EUID -ne 0 -a $USE_SUDO = "true" ]; then + if [ $EUID -ne 0 -a $HELM_INSTALL_USE_SUDO = "true" ]; then CMD="sudo $CMD" fi @@ -301,7 +301,7 @@ while [[ $# -gt 0 ]]; do fi ;; '--no-sudo') - USE_SUDO="false" + HELM_INSTALL_USE_SUDO="false" ;; '--help'|-h) help