From e665bf124d7da7c2557fa0a45d2b56c1b4d5b73b Mon Sep 17 00:00:00 2001 From: Dmitry Astapov Date: Wed, 26 Feb 2025 11:18:38 +0000 Subject: [PATCH] ;run: handle reader prefixes properly --- hledger/Hledger/Cli/Commands/Run.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hledger/Hledger/Cli/Commands/Run.hs b/hledger/Hledger/Cli/Commands/Run.hs index 2a404535e..2b45d68f5 100644 --- a/hledger/Hledger/Cli/Commands/Run.hs +++ b/hledger/Hledger/Cli/Commands/Run.hs @@ -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