Describe the bug
thread '<unnamed>' (6055511) panicked at /Users/qtfkwk/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/minus-5.6.1/src/core/init.rs:311:35:
Static variable RUNMODE set to uninitialized.This is most likely a bug. Please open an issue to the developers
thread 'main' (6055501) panicked at /Users/qtfkwk/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/minus-5.6.1/src/core/init.rs:197:28:
called `Result::unwrap()` on an `Err` value: Any { .. }
To Reproduce
Have a CLI that optionally reads from stdin via:
let mut bytes = Vec::new();
std::io::stdin().lock().read_to_end(&mut bytes)?;
Originally had it without the .lock() but the error is the same either way. Idea was that an open stdin handle was interfering somehow with minus (?).
It manipulates the input, creates a Pager p, writes a &str to it, and then calls minus::page_all(p).
The pager works perfectly when the CLI reads from file(s) given as command line arguments and doesn't read stdin.
Expected behavior
It doesn't panic and the pager works.
Desktop:
- OS: macOS
- Terminal: kitty
- Shell: zsh
minus Version: 5.6.1
Other details
Neither docs nor code mention any special handling with regard to stdin.
Describe the bug
To Reproduce
Have a CLI that optionally reads from stdin via:
Originally had it without the
.lock()but the error is the same either way. Idea was that an open stdin handle was interfering somehow with minus (?).It manipulates the input, creates a Pager
p, writes a &str to it, and then callsminus::page_all(p).The pager works perfectly when the CLI reads from file(s) given as command line arguments and doesn't read stdin.
Expected behavior
It doesn't panic and the pager works.
Desktop:
minusVersion: 5.6.1Other details
Neither docs nor code mention any special handling with regard to stdin.