Skip to content

Commit

Permalink
numfmt: diagnose errors reading the input
Browse files Browse the repository at this point in the history
* src/numfmt.c (main): Exit with failure upon read errors.
* NEWS: Mention the bug fix.
  • Loading branch information
pixelb committed Apr 24, 2023
1 parent 0e62ba2 commit 5595673
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ GNU coreutils NEWS -*- outline -*-
Previously such file names would have caused the strip process to fail.
[This bug was present in "the beginning".]

tsort now diagnoses read errors on the input.
tsort and numfmt now diagnose read errors on the input.
[This bug was present in "the beginning".]


Expand Down
2 changes: 1 addition & 1 deletion src/numfmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1644,7 +1644,7 @@ main (int argc, char **argv)
}

if (ferror (stdin))
error (0, errno, _("error reading input"));
die (EXIT_FAILURE, errno, _("error reading input"));
}

if (debug && !valid_numbers)
Expand Down

0 comments on commit 5595673

Please sign in to comment.