From 5d51ad59b2f4c9520b98da6d2d5f4be1392d4c90 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 9 Jan 2022 18:42:57 -0300 Subject: Fix: hydra_sudo_run: do not enclose the command with quotes when running as root --- lib/hydra/misc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib') 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 "$@" } -- cgit v1.2.3