diff --git a/ChangeLog.md b/ChangeLog.md index 366bfbe1f5..e573a3db43 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -23,6 +23,8 @@ Other enhancements: Bug fixes: +* `stack init --solver` fails if `GHC_PACKAGE_PATH` is present [#860](https://github.com/commercialhaskell/stack/issues/860) + ## 0.1.3.1 Bug fixes: diff --git a/src/Stack/Solver.hs b/src/Stack/Solver.hs index 0513245bec..3f3cbaeb98 100644 --- a/src/Stack/Solver.hs +++ b/src/Stack/Solver.hs @@ -75,7 +75,10 @@ cabalSolver wc cabalfps constraints cabalArgs = withSystemTempDirectory "cabal-s $logInfo "Asking cabal to calculate a build plan, please wait" - bs <- readProcessStdout (Just tmpdir) menv "cabal" args + platform <- asks getPlatform + menv' <- mkEnvOverride platform + $ Map.delete "GHC_PACKAGE_PATH" $ unEnvOverride menv + bs <- readProcessStdout (Just tmpdir) menv' "cabal" args let ls = drop 1 $ dropWhile (not . T.isPrefixOf "In order, ") $ T.lines