From b890a9033cde8844566c0f4b8f986f8c44008ebb Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 17 Feb 2017 15:52:45 -0800 Subject: [PATCH] `contact`/`help`/`version`: Check for --options --- toolsrc/src/commands_contact.cpp | 2 ++ toolsrc/src/commands_help.cpp | 2 ++ toolsrc/src/commands_version.cpp | 2 ++ 3 files changed, 6 insertions(+) diff --git a/toolsrc/src/commands_contact.cpp b/toolsrc/src/commands_contact.cpp index 2be468fb8c..c5b8cab7e8 100644 --- a/toolsrc/src/commands_contact.cpp +++ b/toolsrc/src/commands_contact.cpp @@ -8,6 +8,8 @@ namespace vcpkg::Commands::Contact void perform_and_exit(const vcpkg_cmd_arguments& args) { 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()); exit(EXIT_SUCCESS); } diff --git a/toolsrc/src/commands_help.cpp b/toolsrc/src/commands_help.cpp index 6068c22fb5..49b5697c32 100644 --- a/toolsrc/src/commands_help.cpp +++ b/toolsrc/src/commands_help.cpp @@ -67,6 +67,8 @@ namespace vcpkg::Commands::Help void perform_and_exit(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths) { args.check_max_arg_count(1); + args.check_and_get_optional_command_arguments({}); + if (args.command_arguments.empty()) { print_usage(); diff --git a/toolsrc/src/commands_version.cpp b/toolsrc/src/commands_version.cpp index a521b2567c..3dd90e6300 100644 --- a/toolsrc/src/commands_version.cpp +++ b/toolsrc/src/commands_version.cpp @@ -8,6 +8,8 @@ namespace vcpkg::Commands::Version void perform_and_exit(const vcpkg_cmd_arguments& args) { args.check_exact_arg_count(0); + args.check_and_get_optional_command_arguments({}); + System::println("Vcpkg package management program version %s\n" "\n" "See LICENSE.txt for license information.", Info::version()