Skip to content

Commit

Permalink
Normalise haddock-html paths before parsing (#143)
Browse files Browse the repository at this point in the history
Fixes error seen on Windows.
  • Loading branch information
borsboom committed Jun 22, 2015
1 parent 54e719a commit 4f49c94
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Stack/GhcPkg.hs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import Stack.Build.Types (StackBuildException (Couldn'tFindPkgId))
import Stack.Constants
import Stack.Types
import System.Directory (createDirectoryIfMissing, doesDirectoryExist, canonicalizePath)
import System.FilePath (normalise)
import System.Process.Read

-- | Get the global package database
Expand Down Expand Up @@ -134,7 +135,7 @@ findGhcPkgHaddockHtml :: (MonadIO m, MonadLogger m, MonadBaseControl IO m, Monad
findGhcPkgHaddockHtml menv pkgDbs pkgId = do
mpath <- findGhcPkgField menv pkgDbs (packageIdentifierText pkgId) "haddock-html"
case mpath of
Just !path -> return (parseAbsDir (T.unpack path))
Just !path -> return $ parseAbsDir $ normalise $ T.unpack path
_ -> return Nothing

-- | Get the dependencies of the package.
Expand Down

1 comment on commit 4f49c94

@borsboom
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.