diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2017-01-30 14:17:26 -0800 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2017-01-30 21:52:43 -0800 |
| commit | a7be90f823d9a3b33e58568c28836be33bda5ac8 (patch) | |
| tree | 7809ba8637cd8bb47c9ea6982a9500e70b6c80bf /toolsrc/src/commands_remove.cpp | |
| parent | b4e9322a11aa2d0d9b0f1c0f960d921ce51e1c0f (diff) | |
| download | vcpkg-a7be90f823d9a3b33e58568c28836be33bda5ac8.tar.gz vcpkg-a7be90f823d9a3b33e58568c28836be33bda5ac8.zip | |
Fix usage of remove_plan_type
Diffstat (limited to 'toolsrc/src/commands_remove.cpp')
| -rw-r--r-- | toolsrc/src/commands_remove.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/toolsrc/src/commands_remove.cpp b/toolsrc/src/commands_remove.cpp index 2fc560275..b09790efc 100644 --- a/toolsrc/src/commands_remove.cpp +++ b/toolsrc/src/commands_remove.cpp @@ -9,6 +9,7 @@ namespace vcpkg::Commands::Remove { using Dependencies::package_spec_with_remove_plan; using Dependencies::remove_plan_type; + using Dependencies::request_type; static const std::string OPTION_PURGE = "--purge"; static const std::string OPTION_RECURSIVE = "--recursive"; @@ -180,7 +181,7 @@ namespace vcpkg::Commands::Remove const bool has_non_user_requested_packages = std::find_if(remove_plan.cbegin(), remove_plan.cend(), [](const package_spec_with_remove_plan& package)-> bool { - return package.plan.plan_type == remove_plan_type::REMOVE_AUTO_SELECTED; + return package.plan.request_type != request_type::USER_REQUESTED; }) != remove_plan.cend(); if (has_non_user_requested_packages && !isRecursive) @@ -197,7 +198,7 @@ namespace vcpkg::Commands::Remove { System::println(System::color::success, "Package %s is not installed", action.spec); } - else if (action.plan.plan_type == remove_plan_type::REMOVE_AUTO_SELECTED || action.plan.plan_type == remove_plan_type::REMOVE_USER_REQUESTED) + else if (action.plan.plan_type == remove_plan_type::REMOVE) { const std::string display_name = action.spec.display_name(); System::println("Removing package %s... ", display_name); @@ -206,9 +207,8 @@ namespace vcpkg::Commands::Remove if (alsoRemoveFolderFromPackages) { - const fs::path spec_package_dir = paths.packages / action.spec.dir(); System::println("Purging package %s... ", display_name); - delete_directory(spec_package_dir); + delete_directory(paths.packages / action.spec.dir()); System::println(System::color::success, "Purging package %s... done", display_name); } } |
