Skip to content

Commit 957fca2

Browse files
committed
Include only existent files (no dirs)
1 parent b2f3604 commit 957fca2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Hie/Implicit/Cradle.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,9 @@ findFile p dir = do
177177
b <- doesDirectoryExist dir
178178
if b then getFiles else pure []
179179
where
180-
getFiles = filter p <$> getDirectoryContents dir
180+
getFiles = do
181+
files <- filter p <$> getDirectoryContents dir
182+
filterM doesPredFileExist files
181183
doesPredFileExist file = doesFileExist $ dir </> file
182184

183185
biosWorkDir :: FilePath -> MaybeT IO FilePath

0 commit comments

Comments
 (0)