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

Message ID 20200531204257.18725-2-vincent.legoll@gmail.com
State New
Headers show
Series
  • [bug#40601,1/7] guix-install.sh: Remove "[[" bashisms in chk_init_sys().
Related show

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(-)

Patch
diff mbox series

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"