Commit f8d3d141 authored by Duncan Coutts's avatar Duncan Coutts Committed by Edward Z. Yang
Browse files

Correct path handling for package dirs in project files

Both relative and absolute paths. That is, things like:

packages: this/
parent a825393b
......@@ -610,8 +610,7 @@ findProjectPackages projectRootDir ProjectConfig{..} = do
case () of
_ | isDir
-> do let dirname = filename -- now we know its a dir
glob = globStarDotCabal pkglocstr
matches <- matchFileGlob projectRootDir glob
matches <- matchFileGlob dirname globStarDotCabal
case matches of
-> return (Right (ProjectPackageLocalDirectory
......@@ -638,12 +637,9 @@ findProjectPackages projectRootDir ProjectConfig{..} = do
&& takeExtension (dropExtension f) == ".tar"
globStarDotCabal :: FilePath -> FilePathGlob
globStarDotCabal :: FilePathGlob
globStarDotCabal =
FilePathGlob FilePathRelative
. foldr (\dirpart -> GlobDir [Literal dirpart])
(GlobFile [WildCard, Literal ".cabal"])
. splitDirectories
FilePathGlob FilePathRelative (GlobFile [WildCard, Literal ".cabal"])
--TODO: [code cleanup] use sufficiently recent transformers package
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment