diff mbox series

[bug#40601,2/7] guix-install.sh: Remove $UID bashism.

Message ID 20200531204257.18725-2-vincent.legoll@gmail.com
State Under Review
Delegated to: Christopher Baines
Headers show
Series [bug#40601,1/7] guix-install.sh: Remove "[[" bashisms in chk_init_sys(). | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job

Commit Message

Vincent Legoll May 31, 2020, 8:42 p.m. UTC
* etc/guix-install.sh: Use `id -u' instead of $UID.
---
 etc/guix-install.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index 455e021684..0d7a8c8d44 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -29,7 +29,7 @@  fi
 
 set -e
 
-[ "$UID" -eq 0 ] || { echo "This script must be run as root."; exit 1; }
+[ "$(id -u)" -eq 0 ] || { echo "This script must be run as root."; exit 1; }
 
 REQUIRE=(
     "dirname"