Skip to content

Commit

Permalink
MIN Do not fail when merging empty files
Browse files Browse the repository at this point in the history
closes #113
  • Loading branch information
luispedro committed May 23, 2022
1 parent 3dfa267 commit b0d75c9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion NGLess/StandardModules/Parallel.hs
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,9 @@ mergeCounts ss = do
start <- forM ss $ \s -> do
(s', v) <- lift $ s $$+ (CL.mapM (splitAtTab . unwrapByteLine) .| CC.head)
case v of
Nothing -> throwShouldNotOccur "Trying to merge a headerless file"
Nothing -> do
lift $ outputListLno' WarningOutput ["Merging empty file"]
return (s', placeholder 1)
Just (_,hs) -> do
let p = placeholder (B8.count '\t' hs)
return (s', p)
Expand Down

0 comments on commit b0d75c9

Please sign in to comment.