create/edit: check for --options

This commit is contained in:
Alexander Karatarakis 2017-02-17 15:33:14 -08:00
parent e47f62acea
commit 21729d3d43
2 changed files with 3 additions and 1 deletions

View File

@ -12,8 +12,9 @@ namespace vcpkg::Commands::Create
static const std::string example = Commands::Help::create_example_string(R"###(create zlib2 http://zlib.net/zlib128.zip "zlib128-2.zip")###");
args.check_max_arg_count(3, example);
args.check_min_arg_count(2, example);
args.check_and_get_optional_command_arguments({});
const std::string port_name = args.command_arguments.at(0);
Environment::ensure_utilities_on_path(paths);
// Space OR define the FILENAME with proper spacing

View File

@ -10,6 +10,7 @@ namespace vcpkg::Commands::Edit
{
static const std::string example = Commands::Help::create_example_string("edit zlib");
args.check_exact_arg_count(1, example);
args.check_and_get_optional_command_arguments({});
const std::string port_name = args.command_arguments.at(0);
const fs::path portpath = paths.ports / port_name;