Skip to content

Commit

Permalink
tests: Export nothing for $SUDO if already root
Browse files Browse the repository at this point in the history
obiwac committed Nov 24, 2024

Verified

This commit was signed with the committer’s verified signature.
obiwac Aymeric Wibo
1 parent eec37c5 commit 69ca37b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests.sh
Original file line number Diff line number Diff line change
@@ -5,7 +5,9 @@ export TEST_OUT=.test-out

# Find doas or sudo.

if [ $(uname) = "Linux" ]; then
if [ $(id -u) = 0 ]; then
export SUDO=
elif [ $(uname) = "Linux" ]; then
# XXX Linux is annoying, 'which -s' doesn't exist.
export SUDO=sudo
elif which -s doas; then

0 comments on commit 69ca37b

Please sign in to comment.