Skip to content

Commit

Permalink
chore: Cleaned up error message reporting by disabling env section of…
Browse files Browse the repository at this point in the history
… color_eyre report (#380)

inspired by this example:
near/cargo-near#196
  • Loading branch information
FroVolod authored Aug 10, 2024
1 parent 9872f3a commit 2533b50
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,13 @@ fn main() -> crate::common::CliResult {
crate::common::create_used_account_list_from_keychain(&config.credentials_home_dir)?;
}

color_eyre::install()?;
#[cfg(not(debug_assertions))]
let display_env_section = false;
#[cfg(debug_assertions)]
let display_env_section = true;
color_eyre::config::HookBuilder::default()
.display_env_section(display_env_section)
.install()?;

#[cfg(feature = "self-update")]
let handle = std::thread::spawn(|| -> color_eyre::eyre::Result<String> {
Expand Down

0 comments on commit 2533b50

Please sign in to comment.