diff options
-rw-r--r-- | lib/hydra/misc | 7 |
1 files changed, 6 insertions, 1 deletions
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 "$@" } |