Skip to content

Commit 91997cc

Browse files
committed
Rename try_sudo local variable to skip_sudo
1 parent 9ba36a6 commit 91997cc

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

source.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -381,15 +381,15 @@ function run_as_root() {
381381
script_exit 'Missing required argument to run_as_root()!' 2
382382
fi
383383

384-
local try_sudo
384+
local skip_sudo
385385
if [[ ${1-} =~ ^0$ ]]; then
386-
try_sudo=true
386+
skip_sudo=true
387387
shift
388388
fi
389389

390390
if [[ $EUID -eq 0 ]]; then
391391
"$@"
392-
elif [[ -z ${try_sudo-} ]]; then
392+
elif [[ -z ${skip_sudo-} ]]; then
393393
sudo -H -- "$@"
394394
else
395395
script_exit "Unable to run requested command as root: $*" 1

template.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -385,15 +385,15 @@ function run_as_root() {
385385
script_exit 'Missing required argument to run_as_root()!' 2
386386
fi
387387

388-
local try_sudo
388+
local skip_sudo
389389
if [[ ${1-} =~ ^0$ ]]; then
390-
try_sudo=true
390+
skip_sudo=true
391391
shift
392392
fi
393393

394394
if [[ $EUID -eq 0 ]]; then
395395
"$@"
396-
elif [[ -z ${try_sudo-} ]]; then
396+
elif [[ -z ${skip_sudo-} ]]; then
397397
sudo -H -- "$@"
398398
else
399399
script_exit "Unable to run requested command as root: $*" 1

0 commit comments

Comments
 (0)