From a1bfc9bc38c697c8a575b4b0cdcbd56fa189556b Mon Sep 17 00:00:00 2001 From: Sebastian Estrella <2049686+sestrella@users.noreply.github.com> Date: Thu, 4 Jul 2024 09:10:14 -0500 Subject: [PATCH] Fix shellcheck warning --- lib/utils.bash | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/utils.bash b/lib/utils.bash index 83c1d97..597c074 100644 --- a/lib/utils.bash +++ b/lib/utils.bash @@ -28,12 +28,12 @@ list_all_versions() { } install_version() { - local tool="$1" - local version="$2" - local path="$3" + local tool version path version_prefix - # shellcheck disable=SC2155 - local version_prefix=$(echo "$version" | awk -F. '{print $1 "." $2}') + tool="$1" + version="$2" + path="$3" + version_prefix=$(echo "$version" | awk -F '.' '{print $1 "." $2}') if [[ $tool == "ghc" ]] || { [[ $tool == "hls" ]] && [[ $(echo "$version_prefix >= 1.7" | bc) -eq 1 ]]; }; then ghcup_wrapper install "$tool" "$version" -i "$path"