fix(helm): get/get-helm-3 whitespace support in runAsRoot

When `get`/`get-helm-3` is run with a HELM_INSTALL_DIR containing spaces, the installation fails.

Closes #9346

Signed-off-by: Michael Musenbrock <michael.musenbrock@gmail.com>
pull/9347/head
Michael Musenbrock 4 years ago
parent 64c8df187a
commit 784782013a

@ -50,13 +50,11 @@ initOS() {
# runs the given command as root (detects if we are root already)
runAsRoot() {
local CMD="$*"
if [ $EUID -ne 0 -a $USE_SUDO = "true" ]; then
CMD="sudo $CMD"
if [ $EUID -ne 0 -a "$USE_SUDO" = "true" ]; then
sudo "${@}"
else
"${@}"
fi
$CMD
}
# verifySupported checks that the os/arch combination is supported for

@ -57,13 +57,11 @@ initOS() {
# runs the given command as root (detects if we are root already)
runAsRoot() {
local CMD="$*"
if [ $EUID -ne 0 -a $USE_SUDO = "true" ]; then
CMD="sudo $CMD"
if [ $EUID -ne 0 -a "$USE_SUDO" = "true" ]; then
sudo "${@}"
else
"${@}"
fi
$CMD
}
# verifySupported checks that the os/arch combination is supported for

Loading…
Cancel
Save