Skip to content

Commit

Permalink
tests: Export nothing for $SUDO if already root
Browse files Browse the repository at this point in the history
  • Loading branch information
obiwac committed Nov 24, 2024
1 parent eec37c5 commit 6f323f6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ export TEST_OUT=.test-out

# Find doas or sudo.

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

0 comments on commit 6f323f6

Please sign in to comment.