diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2022-01-09 18:42:57 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2022-01-09 18:42:57 -0300 |
commit | 5d51ad59b2f4c9520b98da6d2d5f4be1392d4c90 (patch) | |
tree | 93989418054070c1a3620bdca6983ad76115bdd8 | |
parent | 6be074848d001aeffd5136b0983f38df7f38de71 (diff) | |
download | hydra-5d51ad59b2f4c9520b98da6d2d5f4be1392d4c90.tar.gz hydra-5d51ad59b2f4c9520b98da6d2d5f4be1392d4c90.tar.bz2 |
Fix: hydra_sudo_run: do not enclose the command with quotes when running as root
-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 "$@" } |