From 81cc12227f0109afec16a2b4ac4471508d23e1dc Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Wed, 25 Feb 2015 08:49:03 +0900 Subject: fix cabal --user bin path on Windows --- .bashrc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.bashrc b/.bashrc index e356b731..501709c9 100644 --- a/.bashrc +++ b/.bashrc @@ -4,8 +4,14 @@ PS1='\[\033[00;33m\]\h \[\033[00;32m\]\w \[\033[00;34m\]\$\[\033[00m\] ' # --- additions to $PATH -if [ -d "$APPDATA/cabal/bin" ]; then - export PATH="$APPDATA/cabal/bin:$PATH" +# First make $APPDATA use the pathing conventions that the rest of +# $PATH appears to use: C: should be /c and forward- not +# backward-slashes. +CYG_APPDATA=$(echo $APPDATA | sed -e "s|C:|/c|;s/\\\\/\//g") + +# Now see if we should add the cabal --user binaries directory. +if [ -d "$CYG_APPDATA/cabal/bin" ]; then + export PATH="$CYG_APPDATA/cabal/bin:$PATH" fi # --- aliases -- cgit v1.2.3