From 5720aa32b1cac8d0d891fde33f7d80c1e49c3e89 Mon Sep 17 00:00:00 2001 From: Julien Roncaglia Date: Sun, 29 Jan 2017 23:17:26 +0100 Subject: [PATCH] Add details for "clear-cache" in --verbose mode Fixes #2118 --- src/Paket.Core/PublicAPI.fs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Paket.Core/PublicAPI.fs b/src/Paket.Core/PublicAPI.fs index 22c326184a..d0ba385e9c 100644 --- a/src/Paket.Core/PublicAPI.fs +++ b/src/Paket.Core/PublicAPI.fs @@ -20,10 +20,14 @@ type Dependencies(dependenciesFileName: string) = |> Seq.toList /// Clears the NuGet cache - static member ClearCache() = - Utils.emptyDir (DirectoryInfo Constants.UserNuGetPackagesFolder) - Utils.emptyDir (DirectoryInfo Constants.NuGetCacheFolder) - Utils.emptyDir (DirectoryInfo Constants.GitRepoCacheFolder) + static member ClearCache() = + let emptyDir path = + verbosefn "Emptying '%s'" path + Utils.emptyDir (DirectoryInfo path) + + emptyDir (Constants.UserNuGetPackagesFolder) + emptyDir (Constants.NuGetCacheFolder) + emptyDir (Constants.GitRepoCacheFolder) /// Tries to locate the paket.dependencies file in the current folder or a parent folder. static member Locate(): Dependencies = Dependencies.Locate(Directory.GetCurrentDirectory())