Skip to content

Commit

Permalink
feat(cli): add color-eyre for automatic line-number backtraces (#211)
Browse files Browse the repository at this point in the history
  • Loading branch information
reem authored Dec 11, 2021
1 parent d90e897 commit 6bbe9b9
Show file tree
Hide file tree
Showing 4 changed files with 109 additions and 0 deletions.
105 changes: 105 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ evm-adapters = { path = "../evm-adapters" }
ethers = { git = "https://github.com/gakonst/ethers-rs" }
ethers-etherscan = { git = "https://github.com/gakonst/ethers-rs" }
eyre = "0.6.5"
color-eyre = "0.5"
rustc-hex = "2.1.0"
serde_json = "1.0.67"
tokio = { version = "1.11.0", features = ["macros"] }
Expand Down
2 changes: 2 additions & 0 deletions cli/src/cast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ use structopt::StructOpt;

#[tokio::main]
async fn main() -> eyre::Result<()> {
color_eyre::install()?;

let opts = Opts::from_args();
match opts.sub {
Subcommands::FromUtf8 { text } => {
Expand Down
1 change: 1 addition & 0 deletions cli/src/forge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ mod utils;

#[tracing::instrument(err)]
fn main() -> eyre::Result<()> {
color_eyre::install()?;
utils::subscriber();

let opts = Opts::from_args();
Expand Down

0 comments on commit 6bbe9b9

Please sign in to comment.