ajalt / mordant

Multiplatform text styling for Kotlin command-line applications
https://ajalt.github.io/mordant/
Apache License 2.0
957 stars 34 forks source link

TerminalInfo interactive doesn't check STDOUT / STDERR #94

Closed b8b closed 1 year ago

b8b commented 1 year ago

https://github.com/ajalt/mordant/blob/9fbf9b8aca06b8d9cf3ff5e511977b5214e142c4/mordant/src/commonMain/kotlin/com/github/ajalt/mordant/terminal/TerminalInfo.kt#L37

The code seems to disagree with the comment. We can easily work around by using terminal.info.inputInteractive && terminal.info.outputInteractive

The bigger issue I have is I try to use Terminal().forStdErr() but see no way to check if STDERR is interactive.

ajalt commented 1 year ago

Yep, that's a typo. I'll get that fixed.