Permalink
Browse files

Better warning for unrecognised options.

Fixes #1693.
  • Loading branch information...
1 parent 34c8307 commit 8630b80a40407af46c1f3618428236ff22704862 @23Skidoo 23Skidoo committed Feb 18, 2014
Showing with 3 additions and 1 deletion.
  1. +3 −1 Cabal/Distribution/Simple/Command.hs
@@ -474,7 +474,9 @@ commandParseArgs command global args =
-- reverse the flags here as we want to process the flags left to right
-- but data flow in function compsition is right to left.
accum flags = foldr (flip (.)) id [ f | Right f <- flags ]
- unrecognised opts = [ "unrecognized option `" ++ opt ++ "'\n"
+ unrecognised opts = [ "unrecognized "
+ ++ "'" ++ (commandName command) ++ "'"
+ ++ " option `" ++ opt ++ "'\n"
| opt <- opts ]
-- For unrecognised global flags we put them in the position just after
-- the command, if there is one. This gives us a chance to parse them

0 comments on commit 8630b80

Please sign in to comment.