Skip to content

Commit

Permalink
Use the correct error code.
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchell-as committed Oct 30, 2024
1 parent 91ae9f7 commit 716f1ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/output/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func (f *JSON) Error(value interface{}) {

func isPipeClosedError(err error) bool {
pipeErr := errors.Is(err, syscall.EPIPE)
if runtime.GOOS == "windows" && errors.Is(err, syscall.Errno(242)) {
if runtime.GOOS == "windows" && errors.Is(err, syscall.Errno(232)) {
// Note: 232 is Windows error code ERROR_NO_DATA, "The pipe is being closed".
// See https://go.dev/src/os/pipe_test.go
pipeErr = true
Expand Down

0 comments on commit 716f1ee

Please sign in to comment.