From 7b56e915fa905f6a84ad2aaa78e617efd1b99e6d Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Thu, 21 Oct 2021 14:30:05 +0200 Subject: [PATCH] cleanup now should take into account of folders --- cmd/cleanup.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cmd/cleanup.go b/cmd/cleanup.go index 0c7ed4c8..6e4f837d 100644 --- a/cmd/cleanup.go +++ b/cmd/cleanup.go @@ -16,6 +16,7 @@ package cmd import ( + "fmt" "io/ioutil" "os" "path/filepath" @@ -45,9 +46,6 @@ var cleanupCmd = &cobra.Command{ } for _, file := range files { - if file.IsDir() { - continue - } if util.DefaultContext.Config.GetGeneral().Debug { util.DefaultContext.Info("Removing ", file.Name()) @@ -62,7 +60,7 @@ var cleanupCmd = &cobra.Command{ } } - util.DefaultContext.Info("Cleaned: ", cleaned, "packages.") + util.DefaultContext.Info(fmt.Sprintf("Cleaned: %d files from %s", cleaned, util.DefaultContext.Config.GetSystem().GetSystemPkgsCacheDirPath())) }, }