commit 599b16834d8056cbd193c686617bb9a4a59182ff
parent 01491890df3a949694f13e7801f03ed083bdb2e8
Author: Scott Moreau <oreaus@gmail.com>
Date: Mon, 23 Mar 2020 21:41:19 -0600
install.sh: Don't use sudo if sudo isn't available
This might be the case on systems like debian.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/install.sh b/install.sh
@@ -80,7 +80,7 @@ function ask_confirmation {
# Usually we use sudo, but if prefix is somewhere in ~/, we don't need sudo
SUDO=sudo
-if [ -w $PREFIX ]; then
+if [ -w $PREFIX ] || ! which sudo > /dev/null; then
SUDO=
fi