mirror of
https://github.com/restic/restic.git
synced 2026-10-07 11:07:11 +00:00
replace globalOptions.stdout with termstatus.OutputWriter
This commit is contained in:
1 parent
c293736841
commit
76b2cdd4fb
29 files changed
+79
-85
No files matched your search
@@ -169,7 +169,7 @@ func runStats(ctx context.Context, opts StatsOptions, gopts GlobalOptions, args
|
||||
}
|
||||
|
||||
if gopts.JSON {
|
||||
err = json.NewEncoder(gopts.stdout).Encode(stats)
|
||||
err = json.NewEncoder(gopts.term.OutputWriter()).Encode(stats)
|
||||
if err != nil {
|
||||
return fmt.Errorf("encoding output: %v", err)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user