From f59c79f259f52de93f3d4695e362046eae088658 Mon Sep 17 00:00:00 2001 From: Mikhail Timofeev <48208649+miketimofeev@users.noreply.github.com> Date: Wed, 22 Sep 2021 19:36:54 +0300 Subject: [PATCH] [macOS] Simpify ghcup code to use "ghcup whereis basedir" (#4127) --- images/macos/provision/core/haskell.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/images/macos/provision/core/haskell.sh b/images/macos/provision/core/haskell.sh index f79b58976..feac3c3ed 100644 --- a/images/macos/provision/core/haskell.sh +++ b/images/macos/provision/core/haskell.sh @@ -16,9 +16,7 @@ for majorMinorVersion in $minorMajorVersions; do ghcup set $fullVersion # remove docs and profiling libs - ghc_bin_dir="$(ghcup whereis --directory ghc $fullVersion)" - [ -e "${ghc_bin_dir}" ] || exit 1 - ghc_dir="$( cd "$( dirname "${ghc_bin_dir}" )" > /dev/null 2>&1 && pwd )" + ghc_dir="$(ghcup whereis basedir)/ghc/$fullVersion" [ -e "${ghc_dir}" ] || exit 1 find "${ghc_dir}" \( -name "*_p.a" -o -name "*.p_hi" \) -type f -delete rm -r "${ghc_dir}"/share/*