Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

fmt: stops at an unreadable file operand and says only 'read error' for a directory

Open Beginner friendly
#15,922 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@emirmrkaljevic is already working on this.

Since Oct 27, 2026.

  • #15923 by @emirmrkaljevic — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
rust
Domain
cli

Research direction

Start with process_file and uumain in the fmt implementation, where the issue says file errors propagate out of the operand loop. Compare that flow with GNU's described behavior: report each unreadable operand, keep processing later files, and return a failing status overall. Reproduce with the issue's fmt d a.txt and fmt missing a.txt examples; done means a.txt is formatted after either error and the directory error names d.

Written by the indexing model from the issue text.

Description

U - fmt

fmt stops at the first file operand it can't read and never formats the files after it. GNU fmt reports the bad operand and goes on with the rest. For a directory operand uutils also prints a bare read error with no file name, where GNU says error reading 'dir': Is a directory.

Found with behave, comparing uutils fmt (main) with GNU coreutils 9.12.

$ mkdir d; printf 'one\ntwo\n' > a.txt

$ fmt d a.txt            # GNU 9.12
fmt: error reading 'd': Is a directory
one two
$ echo $?
1

$ fmt d a.txt            # uutils
fmt: read error
$ echo $?
1

$ fmt missing a.txt      # GNU 9.12
fmt: cannot open 'missing' for reading: No such file or directory
one two

$ fmt missing a.txt      # uutils
fmt: cannot open 'missing' for reading: No such file or directory

In uutils, process_file returns the open/metadata/directory error with ?, and uumain propagates it, so the loop over the files ends there. GNU's fmt_file prints the error, records the failure, and returns so main keeps going.

Dominant language
Rust
Stars
24.3k
Forks
2.1k
Avg merge
1d 21h
Merged PRs (30d)
357

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from uutils/coreutils

All issues in uutils/coreutils

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.