From a8ba910c69bb321c115f5ed6cf4775dd26416482 Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Wed, 8 Mar 2017 05:09:32 -0800 Subject: [PATCH] [subcommands] support --help in subcommands Summary: Turns out that we were special-casing the `Infer Driver` case for no particular reason and that was preventing `infer --diff --help` from working as expected. Reviewed By: martinoluca Differential Revision: D4666988 fbshipit-source-id: 0868d4b --- infer/src/base/CommandLineOption.ml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/infer/src/base/CommandLineOption.ml b/infer/src/base/CommandLineOption.ml index 9d485b3e8..26dd93fd5 100644 --- a/infer/src/base/CommandLineOption.ml +++ b/infer/src/base/CommandLineOption.ml @@ -574,14 +574,7 @@ let set_curr_speclist_for_parse_action ~incomplete ~usage parse_action = let mk_spec ~long ?(short="") spec doc = pad_and_xform doc_width left_width { long; short; meta=""; spec; doc; decode_json=fun _ -> raise (Arg.Bad long)} in - if not (equal_parse_tag parse_tag (Infer ())) then - let skip opt = - (opt, Unit (fun () -> ()), "") in - speclist @ [ - (skip "--help") ; - (skip "-help") - ] - else if incomplete then + if incomplete then speclist @ [ (unknown "--help") ; (unknown "-help")