1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2024-12-22 12:48:01 +00:00

Fallback to standard cabal location on OS X

If ~/Library/Haskell does not exist, fall back to ~/.cabal/bin.

Ideally, we'd parse ~/.cabal/config here, but cabal does not provide an
interface to get configuration settings.
This commit is contained in:
Sebastian Wiesner 2012-10-11 14:23:41 +02:00 committed by Sorin Ionescu
parent 1788d73cd8
commit 13b501adaf

View File

@ -11,11 +11,10 @@ if (( ! $+commands[ghc] )); then
fi
# Prepend Cabal per user directories to PATH/MANPATH.
if [[ "$OSTYPE" == darwin* ]]; then
if [[ "$OSTYPE" == darwin* && -d $HOME/Library/Haskell ]]; then
path=($HOME/Library/Haskell/bin(/N) $path)
manpath=($HOME/Library/Haskell/man(/N) $manpath)
else
path=($HOME/.cabal/bin(/N) $path)
manpath=($HOME/.cabal/man(/N) $manpath)
fi