Skip to content

Commit 4f49c94

Browse files
committed
Normalise haddock-html paths before parsing (#143)
Fixes error seen on Windows.
1 parent 54e719a commit 4f49c94

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Stack/GhcPkg.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ import Stack.Build.Types (StackBuildException (Couldn'tFindPkgId))
3737
import Stack.Constants
3838
import Stack.Types
3939
import System.Directory (createDirectoryIfMissing, doesDirectoryExist, canonicalizePath)
40+
import System.FilePath (normalise)
4041
import System.Process.Read
4142

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

140141
-- | Get the dependencies of the package.

0 commit comments

Comments
 (0)