mirror of https://github.com/restic/restic.git
prune: Add JSON output
This commit is contained in:
parent
ae0835f12d
commit
57dd6e6482
|
@ -211,9 +211,13 @@ func runPruneWithRepo(ctx context.Context, opts PruneOptions, gopts GlobalOption
|
||||||
printer.P("\nWould have made the following changes:")
|
printer.P("\nWould have made the following changes:")
|
||||||
}
|
}
|
||||||
|
|
||||||
err = printPruneStats(printer, plan.Stats())
|
if !gopts.JSON {
|
||||||
if err != nil {
|
err = printPruneStats(printer, plan.Stats())
|
||||||
return err
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
term.Print(ui.ToJSONString(plan.Stats()))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Trigger GC to reset garbage collection threshold
|
// Trigger GC to reset garbage collection threshold
|
||||||
|
|
Loading…
Reference in New Issue