Skip to content

Commit

Permalink
Fix shellcheck warning
Browse files Browse the repository at this point in the history
  • Loading branch information
sestrella committed Jul 4, 2024
1 parent a15243a commit a1bfc9b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/utils.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit a1bfc9b

Please sign in to comment.