Create fish config dir if it doesn't exist

Fixes #106
This commit is contained in:
Julian Ospald 2021-03-08 16:18:26 +01:00
parent 44b5d0dcff
commit 13b27101f1
No known key found for this signature in database
GPG Key ID: 511B62C09D50CD28
1 changed files with 1 additions and 0 deletions

View File

@ -273,6 +273,7 @@ if [ -z "${BOOTSTRAP_HASKELL_NONINTERACTIVE}" ] ; then
"") break ;;
fish)
if ! grep -q "ghcup-env" "${GHCUP_PROFILE_FILE}" ; then
mkdir -p "${GHCUP_PROFILE_FILE%/*}"
echo "# ghcup-env" >> "${GHCUP_PROFILE_FILE}"
echo "set -q GHCUP_INSTALL_BASE_PREFIX[1]; or set GHCUP_INSTALL_BASE_PREFIX \$HOME" >> "${GHCUP_PROFILE_FILE}"
echo "test -f $GHCUP_DIR/env ; and set -gx PATH \$HOME/.cabal/bin $GHCUP_BIN \$PATH" >> "${GHCUP_PROFILE_FILE}"