@@ -412,9 +412,6 @@ options =
412412 , Option "C" ["custom-header"]
413413 (ReqArg
414414 (\arg opt -> do
415− hPutStrLn stderr $
416− "Warning: The -C/--custom-header is deprecated.\n" ++
417− "Please transition to using --template instead."
418415 text <- readFile arg
419416 let newVars = ("legacy-header", text) : optVariables opt
420417 return opt { optVariables = newVars
@@ -561,8 +558,8 @@ main = do
561558
562559 unless (null errors) $
563560 do name <- getProgName
564− mapM_ (\e -> hPutStrLn stderr e) errors
565− hPutStr stderr (usageMessage name options)
561+ mapM_ (\e -> hPutStr stderr (name ++ ": ") >> hPutStr stderr e) errors
562+ hPutStrLn stderr $ "Try " ++ name ++ " --help for more information."
566563 exitWith $ ExitFailure 2
567564
568565 let defaultOpts' = if compatMode
@@ -613,6 +610,13 @@ main = do
613610 mapM_ (\arg -> hPutStrLn stdout arg) args
614611 exitWith ExitSuccess
615612
613+ -- warn about deprecated options
614+ case lookup "legacy-header" variables of
615+ Just _ -> hPutStrLn stderr $
616+ "Warning: The -C/--custom-header is deprecated.\n" ++
617+ "Please transition to using --template instead."
618+ Nothing -> return ()
619+
616620 let sources = if ignoreArgs then [] else args
617621
618622 -- assign reader and writer based on options and filenames