From: Silvio Rhatto Date: Sun, 9 Jan 2022 21:42:57 +0000 (-0300) Subject: Fix: hydra_sudo_run: do not enclose the command with quotes when running as root X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=5d51ad59b2f4c9520b98da6d2d5f4be1392d4c90;p=hydra.git Fix: hydra_sudo_run: do not enclose the command with quotes when running as root --- diff --git a/lib/hydra/misc b/lib/hydra/misc index e4bbbd2..6852f27 100644 --- a/lib/hydra/misc +++ b/lib/hydra/misc @@ -116,7 +116,12 @@ function hydra_safe_run { # Run a command using sudo and abort on error function hydra_sudo_run { - $SUDO "$@" + if [ -z "$SUDO" ]; then + $@ + else + $SUDO "$@" + fi + hydra_exit_on_error "$@" }