guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Christopher Baines
Subject: [bug#40601] [PATCH 2/5] guix-install.sh: Remove $UID bashism.
Date: Wed, 23 Dec 2020 12:17:46 +0000
User-agent: mu4e 1.4.13; emacs 27.1

Vincent Legoll <vincent.legoll@gmail.com> writes:

> * etc/guix-install.sh: Use `id -u' instead of $UID.
> ---
>  etc/guix-install.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/etc/guix-install.sh b/etc/guix-install.sh
> index 26c8622855..0102901010 100755
> --- a/etc/guix-install.sh
> +++ b/etc/guix-install.sh
> @@ -32,7 +32,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"

Should id be added as a requirement?

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]