fix sudo_root for root

This commit is contained in:
pvincent
2026-09-02 14:06:10 +04:00
parent 2b59290ac3
commit 8123105088
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -1,7 +1,8 @@
## library of useful functions, usually prefixed with '_'
function sudo_root {
[[ "$UID" -ne 0 ]] && sudo -vp 'SUDO privilege required: ' 2>/dev/null
[[ $UID == 0 ]] && return
sudo -vp 'SUDO privilege required: ' 2>/dev/null
}
## ASSERT Functions