aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/commands_remove.cpp
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2017-04-18 14:50:25 -0700
committerAlexander Karatarakis <alkarata@microsoft.com>2017-04-18 14:50:25 -0700
commitc2a9d018cac6930387da724ff5f81e887c787b04 (patch)
tree8465863f0aaf39f27428f6212df1cd9f6e97eb2c /toolsrc/src/commands_remove.cpp
parent5a4e7ff1b67ea2139d996af5f0f22f2efac0f27d (diff)
downloadvcpkg-c2a9d018cac6930387da724ff5f81e887c787b04.tar.gz
vcpkg-c2a9d018cac6930387da724ff5f81e887c787b04.zip
Reduce verbosity of `vcpkg remove` when purging the package
Diffstat (limited to 'toolsrc/src/commands_remove.cpp')
-rw-r--r--toolsrc/src/commands_remove.cpp18
1 files changed, 3 insertions, 15 deletions
diff --git a/toolsrc/src/commands_remove.cpp b/toolsrc/src/commands_remove.cpp
index 3a0bed30f..f26cf5dbf 100644
--- a/toolsrc/src/commands_remove.cpp
+++ b/toolsrc/src/commands_remove.cpp
@@ -13,20 +13,6 @@ namespace vcpkg::Commands::Remove
using Dependencies::RequestType;
using Update::OutdatedPackage;
- static void delete_directory(Files::Filesystem& fs, const fs::path& directory)
- {
- std::error_code ec;
- fs.remove_all(directory, ec);
- if (!ec)
- {
- System::println(System::Color::success, "Cleaned up %s", directory.string());
- }
- if (fs.exists(directory))
- {
- System::println(System::Color::warning, "Some files in %s were unable to be removed. Close any editors operating in this directory and retry.", directory.string());
- }
- }
-
static void remove_package(const VcpkgPaths& paths, const PackageSpec& spec, StatusParagraphs* status_db)
{
auto& fs = paths.get_filesystem();
@@ -221,7 +207,9 @@ namespace vcpkg::Commands::Remove
if (alsoRemoveFolderFromPackages)
{
System::println("Purging package %s... ", display_name);
- delete_directory(paths.get_filesystem(), paths.packages / action.spec.dir());
+ Files::Filesystem& fs = paths.get_filesystem();
+ std::error_code ec;
+ fs.remove_all(paths.packages / action.spec.dir(), ec);
System::println(System::Color::success, "Purging package %s... done", display_name);
}
}