Merge pull request #9349 from redeamer/fix_get_helm_runAsRoot_space_issue

fix(helm): get/get-helm-3 whitespace support in runAsRoot
pull/9353/head
Matthew Fisher 5 years ago committed by GitHub
commit fd5788ef0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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