From bdbde7c2120339a854dfdb39bfd6081513ddeccc Mon Sep 17 00:00:00 2001 From: Sebastian Estrella <2049686+sestrella@users.noreply.github.com> Date: Tue, 2 Jul 2024 21:27:42 -0500 Subject: [PATCH] Fix arguments passed to ghcup_wrapper --- .gitignore | 1 + lib/utils.bash | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) 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