diff --git a/module/common/bash/module/Su.sh b/module/common/bash/module/Su.sh index 2ef0c2d1..ca3b71b9 100644 --- a/module/common/bash/module/Su.sh +++ b/module/common/bash/module/Su.sh @@ -8,7 +8,7 @@ function s() { # Run something as root. Runs command as a current user if su is not available. # Usage: sudo function sudo() { - if command -v su; then + if command -v su &> /dev/null; then su -c "$(echo ${*} | tr '\n' ' ')" else ${*}