aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/include
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2017-09-13 16:10:25 -0700
committerAlexander Karatarakis <alkarata@microsoft.com>2017-09-13 16:10:25 -0700
commit43dde3f4892be55558b012b845d864e7be95c7b9 (patch)
tree853d36f4263af8ee99fde5bb7dc20705cb464c9a /toolsrc/include
parente4ea3bd3fa49c487538f1422551ca0557dbc83dc (diff)
downloadvcpkg-43dde3f4892be55558b012b845d864e7be95c7b9.tar.gz
vcpkg-43dde3f4892be55558b012b845d864e7be95c7b9.zip
Refactor package removal code to eliminate its duplication
Diffstat (limited to 'toolsrc/include')
-rw-r--r--toolsrc/include/vcpkg_Commands.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/toolsrc/include/vcpkg_Commands.h b/toolsrc/include/vcpkg_Commands.h
index 756a12f01..079388587 100644
--- a/toolsrc/include/vcpkg_Commands.h
+++ b/toolsrc/include/vcpkg_Commands.h
@@ -82,6 +82,19 @@ namespace vcpkg::Commands
namespace Remove
{
+ enum class Purge
+ {
+ NO = 0,
+ YES
+ };
+
+ inline Purge to_purge(const bool value) { return value ? Purge::YES : Purge::NO; }
+
+ void perform_remove_plan_action(const VcpkgPaths& paths,
+ const Dependencies::RemovePlanAction& action,
+ const Purge purge,
+ StatusParagraphs& status_db);
+
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet);
void remove_package(const VcpkgPaths& paths, const PackageSpec& spec, StatusParagraphs* status_db);
}