From 73ab7186bd45d4c7938ddfe5dc8d04ff4da7f651 Mon Sep 17 00:00:00 2001 From: Xiao Liang Date: Wed, 5 May 2021 06:42:33 -0700 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Yevgeniy Brikman --- modules/install-consul/install-consul | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/install-consul/install-consul b/modules/install-consul/install-consul index 20bcc9dd..6f8cfead 100755 --- a/modules/install-consul/install-consul +++ b/modules/install-consul/install-consul @@ -166,7 +166,8 @@ function fetch_binary { local -r version="$1" local download_url="$2" - local -r cpu_arch="$(uname -m)" + local cpu_arch + cpu_arch="$(uname -m)" local binary_arch="" case "$cpu_arch" in x86_64) @@ -191,7 +192,8 @@ function fetch_binary { # $ uname -m # $ readelf -a /proc/self/exe | grep -q -c Tag_ABI_VFP_args && echo "armhf" || echo "armel" # - local -r vfp_tag="$(readelf -a /proc/self/exe | grep -q -c Tag_ABI_VFP_args)" + local vfp_tag + vfp_tag="$(readelf -a /proc/self/exe | grep -q -c Tag_ABI_VFP_args)" if [[ ! $vfp_tag ]]; then binary_arch="armelv5" else