From 29d0e1bb17b9ef1d0e236b71c23e3cea39d7f0d0 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Thu, 30 Oct 2025 10:55:05 +1100 Subject: [PATCH] `doas` support. --- util/env-bootstrap.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/util/env-bootstrap.sh b/util/env-bootstrap.sh index 3a3ee25b4e..fdc1e25961 100755 --- a/util/env-bootstrap.sh +++ b/util/env-bootstrap.sh @@ -127,7 +127,14 @@ __EOT__ # No need for sudo under QMK MSYS return elif [ $(id -u) -ne 0 ]; then - echo "sudo" + if [ -n "$(command -v sudo 2>/dev/null || true)" ]; then + echo "sudo" + elif [ -n "$(command -v doas 2>/dev/null || true)" ]; then + echo "doas" + else + echo "Please install 'sudo' or 'doas' to continue." >&2 + exit 1 + fi fi true }