Skip to content

Replace atty with std::io::IsTerminal#2

Open
cpolzer wants to merge 1 commit intorobbert-vdh:masterfrom
cpolzer:master
Open

Replace atty with std::io::IsTerminal#2
cpolzer wants to merge 1 commit intorobbert-vdh:masterfrom
cpolzer:master

Conversation

@cpolzer
Copy link
Copy Markdown

@cpolzer cpolzer commented Mar 27, 2026

Hey,

playing around with your nih-plug framework and stumbled over this...

Replace atty with std::io::IsTerminal

atty has a known unsoundness issue (GHSA-g98v-hv3f-hcfr) where it reads from uninitialized memory on Unix platforms.

Since Rust 1.70, std::io::IsTerminal is available in the standard library and covers the same use case. This replaces
the single atty::is(atty::Stream::Stderr) call with std::io::stderr().is_terminal(), removing the atty dependency
entirely.

Changes:

  • Remove atty from Cargo.toml
  • Replace atty::is(atty::Stream::Stderr) with std::io::IsTerminal::is_terminal(&std::io::stderr()) in src/target.rs

No behaviour changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant