Skip to content

Commit 5b66d53

Browse files
authored
Merge pull request #226 from sandydoo/fix/not-enough-input
Fix NAR parsing failure when not enough input is available
2 parents 696c839 + 47e9174 commit 5b66d53

File tree

1 file changed

+1
-1
lines changed
  • hnix-store-core/src/System/Nix/Internal/Nar

1 file changed

+1
-1
lines changed

hnix-store-core/src/System/Nix/Internal/Nar/Parser.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ consume
422422
consume 0 = pure ""
423423
consume n = do
424424
state0 <- State.get
425-
newBytes <- IO.liftIO $ Bytes.hGetSome (handle state0) (max 0 n)
425+
newBytes <- IO.liftIO $ Bytes.hGet (handle state0) (max 0 n)
426426
when (Bytes.length newBytes < n) $
427427
Fail.fail $
428428
"consume: Not enough bytes in handle. Wanted "

0 commit comments

Comments
 (0)