From 68b22402c9180ac01dfecd90e5b251ec9ddf6018 Mon Sep 17 00:00:00 2001 From: aarondill Date: Wed, 5 Jul 2023 13:53:45 -0500 Subject: [PATCH] FIX: SUDO: parameter not set SUDO may not be set, if no parameter or environment variable is passed. This ensures that elevate_priv gets an empty string (as expected) in those cases --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 3d2ad99..8d5d194 100755 --- a/install.sh +++ b/install.sh @@ -156,7 +156,7 @@ main() { _sudo="" else log "Escalated permissions are required to install man pages to ${_man_dir}" - elevate_priv "${_sudo:-$SUDO}" # use previously found command OR user defined + elevate_priv "${_sudo:-${SUDO:-}}" # use previously found command OR user defined _sudo=${RETVAL} log "Installing zoxide man pages as root using $_sudo, please wait…" fi