Skip to content

Commit 6ac21d1

Browse files
Strip whitespace when extracting field from Cabal .conf file
1 parent 7d16566 commit 6ac21d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Stack/Coverage.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ findPackageFieldForBuiltPackage pkgDir pkgId internalLibs field = do
434434
extractField path = do
435435
contents <- readFileUtf8 (toFilePath path)
436436
case asum (map (T.stripPrefix (field <> ": ")) (T.lines contents)) of
437-
Just result -> return $ Right result
437+
Just result -> return $ Right $ T.strip result
438438
Nothing -> notFoundErr
439439
cabalVer <- view cabalVersionL
440440
if cabalVer < mkVersion [1, 24]

0 commit comments

Comments
 (0)