diff --git a/cmd/oras/internal/display/status/print.go b/cmd/oras/internal/display/status/print.go index b79e0726f..aadbe684e 100644 --- a/cmd/oras/internal/display/status/print.go +++ b/cmd/oras/internal/display/status/print.go @@ -47,7 +47,7 @@ func (p *Printer) Println(a ...any) { p.lock.Lock() defer p.lock.Unlock() _, err := fmt.Fprintln(p.out, a...) - if err != nil && p.errored == nil { + if err != nil { p.errored = fmt.Errorf("display output error: %w", err) _, _ = fmt.Fprint(os.Stderr, p.errored) }