aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/commands_remove.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'toolsrc/src/commands_remove.cpp')
-rw-r--r--toolsrc/src/commands_remove.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/toolsrc/src/commands_remove.cpp b/toolsrc/src/commands_remove.cpp
index f5315ccb1..5bb9ecc96 100644
--- a/toolsrc/src/commands_remove.cpp
+++ b/toolsrc/src/commands_remove.cpp
@@ -1,6 +1,7 @@
#include "vcpkg_Commands.h"
#include "vcpkg.h"
#include "vcpkg_System.h"
+#include "vcpkg_Input.h"
namespace vcpkg
{
@@ -22,10 +23,14 @@ namespace vcpkg
void remove_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths, const triplet& default_target_triplet)
{
+ static const std::string example = create_example_string("remove zlib zlib:x64-windows curl boost");
+ args.check_min_arg_count(1, example.c_str());
+
const std::unordered_set<std::string> options = args.check_and_get_optional_command_arguments({OPTION_PURGE});
auto status_db = database_load_check(paths);
- std::vector<package_spec> specs = args.parse_all_arguments_as_package_specs(default_target_triplet);
+ std::vector<package_spec> specs = Input::check_and_get_package_specs(args.command_arguments, default_target_triplet, example.c_str());
+ Input::check_triplets(specs, paths);
bool alsoRemoveFolderFromPackages = options.find(OPTION_PURGE) != options.end();
for (const package_spec& spec : specs)