Skip to content

Commit

Permalink
Try to match dirs again for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
alt-romes committed Feb 2, 2024
1 parent 38baa6a commit 6e6f855
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions Cabal/src/Distribution/Simple/Glob.hs
Original file line number Diff line number Diff line change
Expand Up @@ -518,17 +518,7 @@ runDirFileGlob verbosity mspec rawRoot pat = do
entries <- getDirectoryContents (root </> dir)
catMaybes
<$> mapM
( \s -> do
-- When running a glob from a Cabal package description (i.e.
-- when a cabal spec version is passed as an argument), we
-- disallow matching a @GlobFile@ against a directory, preferring
-- @GlobDir dir GlobDirTrailing@ to specify a directory match.
shouldMatch <- maybe (return True) (const $ doesFileExist (root </> dir </> s)) mspec
return $
if shouldMatch
then (dir </> s <$) <$> doesGlobMatch glob s
else Nothing
)
(\s -> return $ (dir </> s <$) <$> doesGlobMatch glob s)
entries
go (GlobDirRecursive glob) dir = do
entries <- getDirectoryContentsRecursive (root </> dir)
Expand Down

0 comments on commit 6e6f855

Please sign in to comment.