From 4a08f975f613cdb63b15482d7f13cec4ca1ed115 Mon Sep 17 00:00:00 2001 From: Dmitry Astapov Date: Fri, 28 Feb 2025 12:19:30 +0000 Subject: [PATCH] ;run,repl: dont print unrecognized text, error out --- 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 4276d1118..eed903989 100644 --- a/hledger/Hledger/Cli/Commands/Run.hs +++ b/hledger/Hledger/Cli/Commands/Run.hs @@ -124,7 +124,7 @@ runCommand defaultJrnl findBuiltinCommand cmdline = do "echo":args -> putStrLn $ unwords $ args cmdname:args -> case findBuiltinCommand cmdname of - Nothing -> putStrLn $ unwords (cmdname:args) + Nothing -> error' $ "Unrecognized command: " ++ unwords (cmdname:args) Just (cmdmode,cmdaction) -> do -- Even though expandArgsAt is done by the Cli.hs, it stops at the first '--', so we need -- to do it here as well to make sure that each command can use @ARGFILEs