From 6f323f6fa3bbfc165f3d4d252709c24dbe2b34d1 Mon Sep 17 00:00:00 2001 From: Aymeric Wibo Date: Sun, 24 Nov 2024 15:51:01 +0100 Subject: [PATCH] tests: Export nothing for `$SUDO` if already root --- tests.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests.sh b/tests.sh index 6a5541bd..44f77d1e 100644 --- a/tests.sh +++ b/tests.sh @@ -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