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

`termlens diff missing.snap -` waits for standard input before reporting the missing file

Open Beginner friendly
#651 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

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, testing

Research direction

In termlens-cli/src/main.rs, inspect the operand loading near line 399 and find the tests for termlens diff. Start by reproducing the named FIFO case. Load the first operand and return its error before reading the second; add a test showing the command exits 2 promptly with the missing-file message, while diff - b still reads stdin first.

Written by the indexing model from the issue text.

Description

bug good first issue

What happens. When the first operand cannot be read and the second is -, diff reads all of standard input first:

mkfifo fifo; (sleep 8 > fifo &); timeout 4 termlens diff /nonexistent.snap - < fifo; echo $?
# prints nothing; 124 (killed by timeout)

At an interactive terminal it waits for Ctrl-D, then reports the missing file.

Cause. termlens-cli/src/main.rs:399 evaluates (load(a), load(b)) before matching on either result.

Fix. Load the first operand and fail on its error before loading the second. diff - b still reads stdin first.

Done when the repro exits 2 at once with the missing-file message, with a test.

Dominant language
Rust
Stars
28
Forks
24
Avg merge
11h 23m
Merged PRs (30d)
42

Getting set up

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 vyncint/termlens

All issues in vyncint/termlens

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.