aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/commands_remove.cpp
diff options
context:
space:
mode:
authorLiGuilin <liguilin0522@qq.com>2016-10-08 08:34:12 +0800
committerLiGuilin <liguilin0522@qq.com>2016-10-08 08:34:12 +0800
commitc91da2b0c4c3d9218c0b4d1712d744bb35245a61 (patch)
treee1ae0664a4f21f3948bde8c8f9f9e55dea0cb11f /toolsrc/src/commands_remove.cpp
parent280d88b34033ab728e02f725d8d8ff5f9250c6de (diff)
parenta0f621c0fca2c3de8bd5249f023979b800c543cf (diff)
downloadvcpkg-c91da2b0c4c3d9218c0b4d1712d744bb35245a61.tar.gz
vcpkg-c91da2b0c4c3d9218c0b4d1712d744bb35245a61.zip
Merge remote-tracking branch 'upstream/master'
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)