hide index loading progress for JSON output

This commit is contained in:
Michael Eischer committed 2023-10-01 19:53:26 +02:00
1 parent 3fd0ad7448
commit 75f6bd89ed
15 files changed
+17 -17

No files matched your search

+2 -2
View File
@@ -99,11 +99,11 @@ func runCopy(ctx context.Context, opts CopyOptions, gopts GlobalOptions, args []
}
debug.Log("Loading source index")
bar := newProgressMax(!gopts.Quiet, 0, "index files loaded")
bar := newProgressMax(!gopts.Quiet && !gopts.JSON, 0, "index files loaded")
if err := srcRepo.LoadIndex(ctx, bar); err != nil {
return err
}
bar = newProgressMax(!gopts.Quiet, 0, "index files loaded")
bar = newProgressMax(!gopts.Quiet && !gopts.JSON, 0, "index files loaded")
debug.Log("Loading destination index")
if err := dstRepo.LoadIndex(ctx, bar); err != nil {
return err