`termlens diff missing.snap -` waits for standard input before reporting the missing file
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
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
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
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from vyncint/termlens
-
documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
documentation good first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
Maintainers usually reply within 1 day
-
Release notes show a broken link: `extract-changelog.sh` copies a reference but not its definitionOpenbug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
All issues in vyncint/termlens
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
compiler P4 perf
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
HerringtonDarkholme/hd-lang#1044 ·
Maintainers usually reply within 1 day
-
good first issue help wanted r-docs
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
servo/rust-smallvec#824 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
akitaonrails/ai-usagebar#552 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100