mirror of
https://github.com/mudler/luet.git
synced 2025-09-16 15:19:24 +00:00
cleanup now should take into account of folders
This commit is contained in:
@@ -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()))
|
||||
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user