fix handling of common arguments
Summary: getdeps allowed common arguments to be specified either before or after the subcommand name. However, the arguments were only actually honored if they were specified on the command line after the subcommand name. Specifying any of these arguments before the subcommand would simply be ignored, and the default value would be used. This happened since the subcommand argument's default value overwrote the value specified by the user from the main command parser. This fixes the behavior by using `argparse.SUPPRESS` so that argparse won't set the value at all if it was not specified. This allows the value from the main parser to be used correctly if the argument was not seen by the subcommand parser. Reviewed By: chadaustin Differential Revision: D16435358 fbshipit-source-id: f3893ef7a27fb018247f249f313d6438472e0140
Showing
Please register or sign in to comment