mirror of
https://github.com/wahyd4/node-prune.git
synced 2026-08-09 05:06:18 +10:00
fix default dir
This commit is contained in:
@@ -26,7 +26,13 @@ func main() {
|
||||
log.SetLevel(log.DebugLevel)
|
||||
}
|
||||
|
||||
p := prune.New(prune.WithDir(dir))
|
||||
var options []prune.Option
|
||||
|
||||
if dir != "" {
|
||||
options = append(options, prune.WithDir(dir))
|
||||
}
|
||||
|
||||
p := prune.New(options...)
|
||||
|
||||
stats, err := p.Prune()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user