Skip to content
This repository was archived by the owner on Jun 9, 2019. It is now read-only.

Commit 5e2e6c8

Browse files
committed
workaround shelly adding implicit final EOLs
...and thus breaking the EOL-validation
1 parent 2764585 commit 5e2e6c8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Common.hs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,12 @@ gitCatCommit d ref = do
5353

5454
-- | wrapper around @git cat-file commit@
5555
gitCatBlob :: FilePath -> GitRef -> Sh Text
56-
gitCatBlob d ref = runGit d "cat-file" ["blob", ref ]
56+
gitCatBlob d ref = do
57+
tmpl <- liftM tread $ runGit d "cat-file" ["-s", ref] -- workaround shelly adding EOLs
58+
tmp <- runGit d "cat-file" ["blob", ref]
59+
return (T.take tmpl tmp)
60+
where
61+
tread = read . T.unpack
5762

5863
-- | Wrapper around @git rev-parse --verify@
5964
--

0 commit comments

Comments
 (0)