contact/help/version: Check for --options

This commit is contained in:
Alexander Karatarakis 2017-02-17 15:52:45 -08:00
parent 4e44b8533d
commit b890a9033c
3 changed files with 6 additions and 0 deletions

View File

@ -8,6 +8,8 @@ namespace vcpkg::Commands::Contact
void perform_and_exit(const vcpkg_cmd_arguments& args) void perform_and_exit(const vcpkg_cmd_arguments& args)
{ {
args.check_exact_arg_count(0); args.check_exact_arg_count(0);
args.check_and_get_optional_command_arguments({});
System::println("Send an email to %s with any feedback.", Info::email()); System::println("Send an email to %s with any feedback.", Info::email());
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);
} }

View File

@ -67,6 +67,8 @@ namespace vcpkg::Commands::Help
void perform_and_exit(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths) void perform_and_exit(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths)
{ {
args.check_max_arg_count(1); args.check_max_arg_count(1);
args.check_and_get_optional_command_arguments({});
if (args.command_arguments.empty()) if (args.command_arguments.empty())
{ {
print_usage(); print_usage();

View File

@ -8,6 +8,8 @@ namespace vcpkg::Commands::Version
void perform_and_exit(const vcpkg_cmd_arguments& args) void perform_and_exit(const vcpkg_cmd_arguments& args)
{ {
args.check_exact_arg_count(0); args.check_exact_arg_count(0);
args.check_and_get_optional_command_arguments({});
System::println("Vcpkg package management program version %s\n" System::println("Vcpkg package management program version %s\n"
"\n" "\n"
"See LICENSE.txt for license information.", Info::version() "See LICENSE.txt for license information.", Info::version()