aboutsummaryrefslogtreecommitdiff
path: root/ide
diff options
context:
space:
mode:
authorVincent Laporte2019-05-21 12:39:17 +0000
committerVincent Laporte2019-05-21 12:39:17 +0000
commit0aa9a5407874332dfa31f1a0f73d2dc91e95fb39 (patch)
tree2b1a3cb6418624b9f096479ee58cceb28607f921 /ide
parent02d6f5660d54fcf4dfc9cff36cbda41dca3f601f (diff)
parenteed3831a2cc32042fdee95767da00d7e52840371 (diff)
Merge PR #10160: Miscellaneous fixes related to the command line
Ack-by: gares Ack-by: herbelin Reviewed-by: vbgl
Diffstat (limited to 'ide')
-rw-r--r--ide/idetop.ml6
1 files changed, 5 insertions, 1 deletions
diff --git a/ide/idetop.ml b/ide/idetop.ml
index ce00ba6d8c..970d7cf650 100644
--- a/ide/idetop.ml
+++ b/ide/idetop.ml
@@ -537,7 +537,11 @@ let rec parse = function
Xmlprotocol.document Xml_printer.to_string_fmt; exit 0
| "--xml_format=Ppcmds" :: rest ->
msg_format := (fun () -> Xmlprotocol.Ppcmds); parse rest
- | x :: rest -> x :: parse rest
+ | x :: rest ->
+ if String.length x > 0 && x.[0] = '-' then
+ (prerr_endline ("Unknown option " ^ x); exit 1)
+ else
+ x :: parse rest
| [] -> []
let () = Usage.add_to_usage "coqidetop"