From e50d9dc8a1c7c5331e46355efea4e51865c8db09 Mon Sep 17 00:00:00 2001 From: Emile 'iMil' Heitor Date: Mon, 30 Dec 2024 10:33:46 +0100 Subject: [PATCH] fix: don't sudo if not needed --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7e18f6e..6cc7285 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ ARCH?= amd64 SMOLI386= netbsd-SMOLi386 DIST= https://nycdn.netbsd.org/pub/NetBSD-daily/netbsd-${VERS}/latest/${ARCH}/binary KDIST= ${DIST} -SUDO!= command -v doas || echo "sudo -E ARCH=${ARCH} VERS=${VERS}" +SUDO!= [ ${UID} = 0 ] || command -v doas || echo "sudo -E ARCH=${ARCH} VERS=${VERS}" WHOAMI!= whoami USER!= id -un GROUP!= id -gn