diff --git a/pkg/cmd/pr/diff/diff.go b/pkg/cmd/pr/diff/diff.go index 3c55e7db8..2bea8072b 100644 --- a/pkg/cmd/pr/diff/diff.go +++ b/pkg/cmd/pr/diff/diff.go @@ -7,6 +7,7 @@ import ( "io" "net/http" "strings" + "syscall" "github.com/cli/cli/api" "github.com/cli/cli/context" @@ -98,6 +99,9 @@ func diffRun(opts *DiffOptions) error { if opts.UseColor == "never" { _, err = io.Copy(opts.IO.Out, diff) + if errors.Is(err, syscall.EPIPE) { + return nil + } return err }