diff --git a/Cargo.toml b/Cargo.toml index 79780f9..60eadd3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,7 @@ once_cell = "1.8.0" unicode-width = "0.1.9" owo-colors = { version = "3.0.0", optional = true } -is-terminal = { version = "0.4.1", optional = true } +is-terminal = { version = "0.4.0", optional = true } textwrap = { version = "0.15.0", optional = true } supports-hyperlinks = { git = "https://github.com/Porges/supports-hyperlinks", optional = true } supports-color = { git = "https://github.com/zkat/supports-color", optional = true } diff --git a/src/handler.rs b/src/handler.rs index 09545ce..e983a55 100644 --- a/src/handler.rs +++ b/src/handler.rs @@ -191,7 +191,9 @@ impl MietteHandlerOpts { let characters = match self.unicode { Some(true) => ThemeCharacters::unicode(), Some(false) => ThemeCharacters::ascii(), - None if supports_unicode::on(&std::io::stderr()) => ThemeCharacters::unicode(), + None if supports_unicode::on(supports_unicode::Stream::Stderr) => { + ThemeCharacters::unicode() + } None => ThemeCharacters::ascii(), }; let styles = if self.color == Some(false) { @@ -255,7 +257,7 @@ impl MietteHandlerOpts { if let Some(linkify) = self.linkify { linkify } else { - supports_hyperlinks::on(&std::io::stderr()) + supports_hyperlinks::on(supports_hyperlinks::Stream::Stderr) } }