diff mbox series

[bug#40601,27/28] Fix variable use in guix_get_bin_list()

Message ID 20200517171725.732-27-vincent.legoll@gmail.com
State Under Review
Delegated to: Christopher Baines
Headers show
Series [bug#40601,01/28] nix/local.mk: Add missing comment to sysvinit section. | expand

Checks

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

Commit Message

Vincent Legoll May 17, 2020, 5:17 p.m. UTC
- Add missing curly-brackets
- Add implicit array zero-indexing
---
 etc/guix-install.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index 4ee350a155..be2fd74905 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -215,7 +215,7 @@  guix_get_bin_list()
         | sed -n -e 's/.*guix-binary-\([0-9.]*\)\..*.tar.xz.*/\1/p' \
         | sort -Vu)")
 
-    latest_ver="$(echo "$bin_ver_ls" \
+    latest_ver="$(echo "${bin_ver_ls[0]}" \
                        | grep -oE "([0-9]{1,2}\.){2}[0-9]{1,2}" \
                        | tail -n1)"
 
@@ -229,7 +229,7 @@  guix_get_bin_list()
     fi
 
     # Use default to download according to the list and local ARCH_OS.
-    BIN_VER="$default_ver"
+    BIN_VER="${default_ver}"
 }
 
 guix_get_bin()