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
This commit is contained in:
parent
7d1454e430
commit
68b22402c9
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue