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 <metal3d@gmail.com>
pull/9142/head
Patrice Ferlet 5 years ago
parent bed1a42a39
commit 1347803228

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

Loading…
Cancel
Save