diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2017-02-17 00:01:14 -0800 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2017-02-17 00:05:23 -0800 |
| commit | c1a2c79b6b59bc05df1ce06a7c18f8f14f9a5424 (patch) | |
| tree | 2ac6b41e4604c81b78ae2f77ad982dcc1cfe31c1 /toolsrc/src/commands_remove.cpp | |
| parent | 6d2b407b28417009fec0964b7339280d337dae6c (diff) | |
| download | vcpkg-c1a2c79b6b59bc05df1ce06a7c18f8f14f9a5424.tar.gz vcpkg-c1a2c79b6b59bc05df1ce06a7c18f8f14f9a5424.zip | |
[remove-command] Reorder input processing
Diffstat (limited to 'toolsrc/src/commands_remove.cpp')
| -rw-r--r-- | toolsrc/src/commands_remove.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/toolsrc/src/commands_remove.cpp b/toolsrc/src/commands_remove.cpp index 92ab56a28..1daacb944 100644 --- a/toolsrc/src/commands_remove.cpp +++ b/toolsrc/src/commands_remove.cpp @@ -167,15 +167,13 @@ namespace vcpkg::Commands::Remove { static const std::string example = Commands::Help::create_example_string("remove zlib zlib:x64-windows curl boost"); args.check_min_arg_count(1, example); - - const std::unordered_set<std::string> options = args.check_and_get_optional_command_arguments({OPTION_PURGE, OPTION_RECURSE}); - auto status_db = database_load_check(paths); - std::vector<package_spec> specs = Input::check_and_get_package_specs(args.command_arguments, default_target_triplet, example); Input::check_triplets(specs, paths); + const std::unordered_set<std::string> options = args.check_and_get_optional_command_arguments({ OPTION_PURGE, OPTION_RECURSE }); const bool alsoRemoveFolderFromPackages = options.find(OPTION_PURGE) != options.end(); const bool isRecursive = options.find(OPTION_RECURSE) != options.end(); + auto status_db = database_load_check(paths); const std::vector<package_spec_with_remove_plan> remove_plan = Dependencies::create_remove_plan(specs, status_db); Checks::check_exit(!remove_plan.empty(), "Remove plan cannot be empty"); |
