Bump eyre-rs/color-eyre#99.
I love color-eyre when developing locally; it is so incredibly helpful! But the colors are a problem when deploying to prod where, for example, Cloudwatch logs for AWS Lambda functions just include raw ANSI escape sequences. I'm working around that right now by using this code in my setup function:
if std::env::var("NO_COLOR") == Err(std::env::VarError::NotPresent) {
color_eyre::install()?;
} else {
color_eyre::config::HookBuilder::new()
.theme(color_eyre::config::Theme::new())
.install()?;
}
and making sure our prod deployments include NO_COLOR=1.
I'd love to see either:
a mention of this particular pattern in the docs (I searched and couldn't find anything), or
a change to HookBuilder::blank() selecting either the default dark theme or the blank theme based on the presence of NO_COLOR
I'm sure you've already seen this, but I found https://no-color.org/ helpful
I'm sorry I don't have the time right now to write up a draft PR for you.
Bump eyre-rs/color-eyre#99.