diff --git a/cmd/node-prune/main.go b/cmd/node-prune/main.go index f8a581b..77c1e72 100644 --- a/cmd/node-prune/main.go +++ b/cmd/node-prune/main.go @@ -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 {