From 5e944374de5beb1c3bc64251965a066b0e063310 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Fri, 29 Jun 2012 22:48:41 +0000 Subject: [PATCH] web: don't auto-create a missing journal file at startup --- hledger-lib/Hledger/Read.hs | 2 +- hledger-web/hledger-web.hs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hledger-lib/Hledger/Read.hs b/hledger-lib/Hledger/Read.hs index 9defb5bc3..be030c37e 100644 --- a/hledger-lib/Hledger/Read.hs +++ b/hledger-lib/Hledger/Read.hs @@ -167,7 +167,7 @@ requireJournalFileExists f = do exists <- doesFileExist f when (not exists) $ do hPrintf stderr "The hledger journal file \"%s\" was not found.\n" f - hPrintf stderr "Please create it first, eg with hledger add, hledger web, or a text editor.\n" + hPrintf stderr "Please create it first, eg with hledger add or a text editor.\n" hPrintf stderr "Or, specify an existing journal file with -f or LEDGER_FILE.\n" exitFailure diff --git a/hledger-web/hledger-web.hs b/hledger-web/hledger-web.hs index 8d27110a0..6860385db 100644 --- a/hledger-web/hledger-web.hs +++ b/hledger-web/hledger-web.hs @@ -42,7 +42,7 @@ runWith opts | "help" `in_` (rawopts_ $ cliopts_ opts) = putStr (showModeHelp webmode) >> exitSuccess | "version" `in_` (rawopts_ $ cliopts_ opts) = putStrLn prognameandversion >> exitSuccess | "binary-filename" `in_` (rawopts_ $ cliopts_ opts) = putStrLn (binaryfilename progname) - | otherwise = journalFilePathFromOpts (cliopts_ opts) >>= ensureJournalFileExists >> withJournalDo' opts web + | otherwise = journalFilePathFromOpts (cliopts_ opts) >>= requireJournalFileExists >> withJournalDo' opts web withJournalDo' :: WebOpts -> (WebOpts -> Journal -> IO ()) -> IO () withJournalDo' opts cmd = do