mirror of
https://github.com/mudler/luet.git
synced 2025-09-17 07:42:25 +00:00
cleanup now should take into account of folders
This commit is contained in:
@@ -16,6 +16,7 @@
|
|||||||
package cmd
|
package cmd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
@@ -45,9 +46,6 @@ var cleanupCmd = &cobra.Command{
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, file := range files {
|
for _, file := range files {
|
||||||
if file.IsDir() {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
if util.DefaultContext.Config.GetGeneral().Debug {
|
if util.DefaultContext.Config.GetGeneral().Debug {
|
||||||
util.DefaultContext.Info("Removing ", file.Name())
|
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