diff --git a/.gitignore b/.gitignore index 0820dbb..612b597 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .devenv .direnv +.ghcup .pre-commit-config.yaml diff --git a/lib/utils.bash b/lib/utils.bash index 066d8c2..86327db 100644 --- a/lib/utils.bash +++ b/lib/utils.bash @@ -19,11 +19,11 @@ ensure_ghcup() { } ghcup_wrapper() { - GHCUP_INSTALL_BASE_PREFIX="$(asdf_plugin_path)" "$(ghcup_bin_dir)/ghcup" "@" + ensure_ghcup + GHCUP_INSTALL_BASE_PREFIX="$(asdf_plugin_path)" "$(ghcup_bin_dir)/ghcup" "$@" } list_all_versions() { - ensure_ghcup ghcup_wrapper list -t "$1" -r | awk '{printf $2" "}' } @@ -36,8 +36,6 @@ install_version() { local version="$2" local path="$3" - ensure_ghcup - if [[ $tool == "ghc" ]] || { [[ $tool == "hls" ]] && [[ $(ver "$version") -ge $(ver "1.7") ]]; }; then ghcup_wrapper install "$tool" "$version" -i "$path" else