Skip to content

Commit

Permalink
Remove reference to ASDF_PLUGIN_PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
sestrella committed Dec 3, 2023
1 parent 2fe6624 commit 6271d23
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.devenv/
.direnv/
.ghcup/
node_modules/

.pre-commit-config.yaml
8 changes: 6 additions & 2 deletions lib/utils.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
asdf_plugin_path() {
echo "$(dirname "$(dirname "$0")")"
}

ghcup_bin_dir() {
echo "$ASDF_PLUGIN_PATH/.ghcup/bin"
echo "$(asdf_plugin_path)/.ghcup/bin"
}

check_ghcup() {
Expand All @@ -8,7 +12,7 @@ check_ghcup() {
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | env \
BOOTSTRAP_HASKELL_MINIMAL=1 \
BOOTSTRAP_HASKELL_NONINTERACTIVE=1 \
GHCUP_INSTALL_BASE_PREFIX="$ASDF_PLUGIN_PATH" \
GHCUP_INSTALL_BASE_PREFIX="$(asdf_plugin_path)" \
sh
fi
}
3 changes: 0 additions & 3 deletions test/install.bats
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,12 @@ setup() {
load 'test_helper/bats-assert/load'
DIR="$( cd "$( dirname "$BATS_TEST_FILENAME" )" >/dev/null 2>&1 && pwd )"
PATH="$DIR/../bin:$PATH"
export ASDF_PLUGIN_PATH=$(mktemp -dt asdf-plugin-XXXX)
export ASDF_INSTALL_PATH=$(mktemp -dt asdf-XXXX)
}

teardown() {
rm -rf "${ASDF_INSTALL_PATH}"
unset ASDF_INSTALL_PATH
rm -rf "$ASDF_PLUGIN_PATH"
unset ASDF_PLUGIN_PATH
}

@test "cabal 3.6.2.0" {
Expand Down
6 changes: 0 additions & 6 deletions test/list-all.bats
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@ setup() {
load 'test_helper/bats-assert/load'
DIR="$( cd "$( dirname "$BATS_TEST_FILENAME" )" >/dev/null 2>&1 && pwd )"
PATH="$DIR/../bin:$PATH"
export ASDF_PLUGIN_PATH=$(mktemp -dt asdf-plugin-XXXX)
}

teardown() {
rm -rf "$ASDF_PLUGIN_PATH"
unset ASDF_PLUGIN_PATH
}

@test "cabal" {
Expand Down

0 comments on commit 6271d23

Please sign in to comment.