mirror of https://github.com/zkat/miette.git
Update for new versions of supports-* crates
This commit is contained in:
parent
3f30d76505
commit
4c3dcd7c22
|
|
@ -19,7 +19,7 @@ once_cell = "1.8.0"
|
||||||
unicode-width = "0.1.9"
|
unicode-width = "0.1.9"
|
||||||
|
|
||||||
owo-colors = { version = "3.0.0", optional = true }
|
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 }
|
textwrap = { version = "0.15.0", optional = true }
|
||||||
supports-hyperlinks = { git = "https://github.com/Porges/supports-hyperlinks", optional = true }
|
supports-hyperlinks = { git = "https://github.com/Porges/supports-hyperlinks", optional = true }
|
||||||
supports-color = { git = "https://github.com/zkat/supports-color", optional = true }
|
supports-color = { git = "https://github.com/zkat/supports-color", optional = true }
|
||||||
|
|
|
||||||
|
|
@ -191,7 +191,9 @@ impl MietteHandlerOpts {
|
||||||
let characters = match self.unicode {
|
let characters = match self.unicode {
|
||||||
Some(true) => ThemeCharacters::unicode(),
|
Some(true) => ThemeCharacters::unicode(),
|
||||||
Some(false) => ThemeCharacters::ascii(),
|
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(),
|
None => ThemeCharacters::ascii(),
|
||||||
};
|
};
|
||||||
let styles = if self.color == Some(false) {
|
let styles = if self.color == Some(false) {
|
||||||
|
|
@ -255,7 +257,7 @@ impl MietteHandlerOpts {
|
||||||
if let Some(linkify) = self.linkify {
|
if let Some(linkify) = self.linkify {
|
||||||
linkify
|
linkify
|
||||||
} else {
|
} else {
|
||||||
supports_hyperlinks::on(&std::io::stderr())
|
supports_hyperlinks::on(supports_hyperlinks::Stream::Stderr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue