build: update miette dependency (#5889)

This commit is contained in:
Benoît Cortier
2022-06-26 08:03:38 -04:00
committed by GitHub
parent c5a69271a2
commit 228ede18cf
6 changed files with 17 additions and 16 deletions

View File

@ -1,5 +1,5 @@
use crate::engine::StateWorkingSet;
use miette::{LabeledSpan, MietteHandlerOpts, ReportHandler, Severity, SourceCode};
use miette::{LabeledSpan, MietteHandlerOpts, ReportHandler, RgbColors, Severity, SourceCode};
use thiserror::Error;
/// This error exists so that we can defer SourceCode handling. It simply
@ -24,14 +24,15 @@ impl std::fmt::Debug for CliError<'_> {
let miette_handler = MietteHandlerOpts::new()
// For better support of terminal themes use the ANSI coloring
.rgb_colors(false)
.ansi_colors(true)
.rgb_colors(RgbColors::Never)
// If ansi support is disabled in the config disable the eye-candy
.color(ansi_support)
.unicode(ansi_support)
.terminal_links(ansi_support)
.build();
miette_handler.debug(self, f)?;
Ok(())
}
}