From 13b501adaff3ce4610f275ec9d414dc41e3a7981 Mon Sep 17 00:00:00 2001 From: Sebastian Wiesner Date: Thu, 11 Oct 2012 14:23:41 +0200 Subject: [PATCH] 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. --- modules/haskell/init.zsh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/haskell/init.zsh b/modules/haskell/init.zsh index da8cd39..8690ce1 100644 --- a/modules/haskell/init.zsh +++ b/modules/haskell/init.zsh @@ -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 -