;run: handle reader prefixes properly

This commit is contained in:
Dmitry Astapov 2025-02-26 11:18:38 +00:00 committed by Simon Michael
parent a76d23957f
commit e665bf124d

View File

@ -167,7 +167,7 @@ withJournalCached cliopts cmd = do
where
-- | Read a journal file, caching it if it has not been read before.
readAndCacheJournalFile :: InputOpts -> PrefixedFilePath -> IO Journal
readAndCacheJournalFile iopts "-" = do
readAndCacheJournalFile iopts fp | snd (splitReaderPrefix fp) == "-" = do
dbg1IO "readAndCacheJournalFile using stdin, not cached" "-"
j <- runExceptT $ readJournalFile iopts "-"
either error' return j