Closed aykevl closed 8 months ago
@dalance can you take a look at this PR?
@aykevl Sorry for the late reply. I missed this PR. I want to keep minimum Rust version under 1.70, so could you change to use the is-terminal crate instead? If so, I'll merge and release as soon as possible.
I've updated the PR! I've tested the PR with Rust 1.69, but according to the is-terminal crate it should work with Rust down to version 1.63.
Also I ran cargo fmt
.
Thanks! I've released v0.4.4.
That was my first Rust PR :) I'll be using it in bat.
It doesn't make sense to try to set a terminal as a raw terminal if it isn't actually a terminal. Worse, this may break tests that assume they can simply provide a pipe to a subprocess and expect the terminal will be unchanged.
See this PR, which needs this patch: https://github.com/sharkdp/bat/pull/2631
Note that this requires Rust 1.70 for the
IsTerminal
trait, if that's too new I can switch this PR to use the is-terminal crate instead. https://blog.rust-lang.org/2023/06/01/Rust-1.70.0.html#isterminal