From 6be50bcb610bf4bb6134358627f059098361c829 Mon Sep 17 00:00:00 2001 From: tchakkazulu Date: Wed, 23 Apr 2014 02:14:39 +0200 Subject: [PATCH] Platform dependent search path separator When using cabal exec on Windows, it would give an error such as: ghc.exe: can't find a package database at C:\Users\tchakkazulu\path\to\dir\.cabal-sandbox\i386-windows-ghc-7.6.3-packages.conf.d:C:\Program Files (x86)\Haskell Platform\2013.2.0.0\lib\package.conf.d (cherry picked from commit 12deea33d0b3c4090abe47ec5f30ae57217e10d0) Conflicts: cabal-install/Main.hs --- cabal-install/Main.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cabal-install/Main.hs b/cabal-install/Main.hs index 0ce0c2077e5..59bd968d8ee 100644 --- a/cabal-install/Main.hs +++ b/cabal-install/Main.hs @@ -140,7 +140,7 @@ import qualified Paths_cabal_install (version) import System.Environment (getArgs, getProgName) import System.Exit (exitFailure) -import System.FilePath (splitExtension, takeExtension) +import System.FilePath (splitExtension, takeExtension, searchPathSeparator) import System.IO (BufferMode(LineBuffering), hSetBuffering, stdout) import System.Directory (doesFileExist, getCurrentDirectory) @@ -1046,7 +1046,8 @@ execAction execFlags extraArgs globalFlags = do exitFailure Just ghcProg -> do g <- ghcGlobalPackageDB verbosity ghcProg - getEffectiveEnvironment [("GHC_PACKAGE_PATH", Just $ s ++ ":" ++ g)] + getEffectiveEnvironment + [("GHC_PACKAGE_PATH", Just $ s ++ [searchPathSeparator] ++ g)] -- | See 'Distribution.Client.Install.withWin32SelfUpgrade' for details. --