From d4a3a8c3a0ba8b422f4ca1b1e49eea3ad5b404ae Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Fri, 23 Sep 2011 14:07:50 +0000 Subject: [PATCH] web: do auto-create the journal for the web command At add time would be better, but for at startup is easier --- hledger-web/hledger-web.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hledger-web/hledger-web.hs b/hledger-web/hledger-web.hs index 8bc0fc8c2..d0312c70c 100644 --- a/hledger-web/hledger-web.hs +++ b/hledger-web/hledger-web.hs @@ -43,7 +43,7 @@ runWith opts = run opts | "help" `in_` (rawopts_ $ cliopts_ opts) = putStr (showModeHelp webmode) >> exitSuccess | "version" `in_` (rawopts_ $ cliopts_ opts) = putStrLn progversion >> exitSuccess | "binary-filename" `in_` (rawopts_ $ cliopts_ opts) = putStrLn (binaryfilename progname) - | otherwise = withJournalDo' opts web + | otherwise = journalFilePathFromOpts (cliopts_ opts) >>= ensureJournalFile >> withJournalDo' opts web withJournalDo' :: WebOpts -> (WebOpts -> Journal -> IO ()) -> IO () withJournalDo' opts cmd = do