Merge pull request #4535 from MichaelEischer/fix-cat-command

Only show index loading progress bar if stdout is a terminal
This commit is contained in:
Michael Eischer 2023-10-23 21:28:13 +02:00 committed by GitHub
commit d399e32590
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -98,9 +98,9 @@ func printProgress(status string) {
}
func newIndexProgress(quiet bool, json bool) *progress.Counter {
return newProgressMax(!quiet && !json, 0, "index files loaded")
return newProgressMax(!quiet && !json && stdoutIsTerminal(), 0, "index files loaded")
}
func newIndexTerminalProgress(quiet bool, json bool, term *termstatus.Terminal) *progress.Counter {
return newTerminalProgressMax(!quiet && !json, 0, "index files loaded", term)
return newTerminalProgressMax(!quiet && !json && stdoutIsTerminal(), 0, "index files loaded", term)
}