From b1111396fdf0402f7d15e7ada67c83db7fbf0e6e Mon Sep 17 00:00:00 2001 From: zarazaex69 Date: Mon, 13 Apr 2026 01:28:00 +0300 Subject: [PATCH] chore(script): improve podman installation privilege escalation --- script/cnc.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/script/cnc.sh b/script/cnc.sh index bde7228..673b2e5 100755 --- a/script/cnc.sh +++ b/script/cnc.sh @@ -19,8 +19,13 @@ if ! command -v podman &> /dev/null; then if [ "$(id -u)" -eq 0 ]; then SUDO="" - else + elif command -v sudo &> /dev/null; then SUDO="sudo" + elif command -v doas &> /dev/null; then + SUDO="doas" + else + echo "[X] No sudo/doas found and not running as root. Cannot install podman." + exit 1 fi if command -v apt &> /dev/null; then