Skip to content

Commit

Permalink
Platform dependent search path separator
Browse files Browse the repository at this point in the history
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 12deea3)

Conflicts:
	cabal-install/Main.hs
  • Loading branch information
tchakkazulu authored and tibbe committed May 3, 2014
1 parent d052741 commit 6be50bc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cabal-install/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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.
--
Expand Down

0 comments on commit 6be50bc

Please sign in to comment.