Skip to content

Commit

Permalink
Fix arguments passed to ghcup_wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
sestrella committed Jul 3, 2024
1 parent 12bfeb1 commit bdbde7c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.devenv
.direnv
.ghcup
.pre-commit-config.yaml
6 changes: 2 additions & 4 deletions lib/utils.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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" "}'
}

Expand All @@ -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
Expand Down

0 comments on commit bdbde7c

Please sign in to comment.