From 4313d8f398e12093b866fa8029b712c86f1bc127 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 17 Feb 2017 15:38:39 -0800 Subject: [PATCH] `owns`: check for --options --- toolsrc/include/vcpkg_Commands.h | 10 +++++----- toolsrc/src/commands_import.cpp | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/toolsrc/include/vcpkg_Commands.h b/toolsrc/include/vcpkg_Commands.h index 7956cdab8da..907190bfce6 100644 --- a/toolsrc/include/vcpkg_Commands.h +++ b/toolsrc/include/vcpkg_Commands.h @@ -79,11 +79,6 @@ namespace vcpkg::Commands void perform_and_exit(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths); } - namespace Import - { - void perform_and_exit(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths); - } - namespace Owns { void perform_and_exit(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths); @@ -94,6 +89,11 @@ namespace vcpkg::Commands void perform_and_exit(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths); } + namespace Import + { + void perform_and_exit(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths); + } + namespace Integrate { extern const char*const INTEGRATE_COMMAND_HELPSTRING; diff --git a/toolsrc/src/commands_import.cpp b/toolsrc/src/commands_import.cpp index 7af2c7185d0..4b71fc29014 100644 --- a/toolsrc/src/commands_import.cpp +++ b/toolsrc/src/commands_import.cpp @@ -79,6 +79,7 @@ namespace vcpkg::Commands::Import { static const std::string example = Commands::Help::create_example_string(R"(import C:\path\to\CONTROLfile C:\path\to\includedir C:\path\to\projectdir)"); args.check_exact_arg_count(3, example); + args.check_and_get_optional_command_arguments({}); const fs::path control_file_path(args.command_arguments[0]); const fs::path include_directory(args.command_arguments[1]);