mirror of https://github.com/voidlizard/hbs2
fixed fixme-new wtf with lazy io
This commit is contained in:
parent
cb70ac7c66
commit
109971d74c
|
@ -365,22 +365,23 @@ Issue text...
|
|||
flip runContT pure $ callCC \exit -> do
|
||||
fname <- liftIO $ Temp.writeTempFile "." "fixme-issue" txt
|
||||
|
||||
h1 <- liftIO $ try @_ @SomeException (LBS.readFile fname)
|
||||
<&> fromRight mempty
|
||||
ContT $ bracket none (const $ rm fname)
|
||||
|
||||
h1 <- liftIO (BS.readFile fname)
|
||||
<&> hashObject @HbSync
|
||||
|
||||
ContT $ bracket none (const $ rm fname)
|
||||
debug $ "hash1" <+> pretty h1
|
||||
|
||||
void $ runProcess $ shell [qc|{editor} {fname}|]
|
||||
|
||||
s <- liftIO $ LBS.readFile fname
|
||||
s <- liftIO $ BS.readFile fname <&> LBS.fromStrict
|
||||
|
||||
h2 <- liftIO $ try @_ @SomeException (LBS.readFile fname)
|
||||
<&> fromRight mempty
|
||||
<&> hashObject @HbSync
|
||||
let h2 = hashObject @HbSync s
|
||||
|
||||
fxs <- lift $ scanBlobOpts NoIndents Nothing s
|
||||
|
||||
debug $ "hash before/after" <+> pretty h1 <+> pretty h2
|
||||
|
||||
when (h1 == h2) $ exit ()
|
||||
|
||||
lift $ withState $ transactional do
|
||||
|
|
Loading…
Reference in New Issue