Skip to content

Commit

Permalink
chore: do not print anvil launch info if silent (#9259)
Browse files Browse the repository at this point in the history
chore: do not print anvil port if silent
  • Loading branch information
grandizzy authored Nov 4, 2024
1 parent 32f8e79 commit 931374b
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions crates/anvil/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,17 +295,19 @@ impl NodeHandle {
/// Prints the launch info.
pub(crate) fn print(&self, fork: Option<&ClientFork>) {
self.config.print(fork);
if let Some(ipc_path) = self.ipc_path() {
let _ = sh_println!("IPC path: {ipc_path}");
if !self.config.silent {
if let Some(ipc_path) = self.ipc_path() {
let _ = sh_println!("IPC path: {ipc_path}");
}
let _ = sh_println!(
"Listening on {}",
self.addresses
.iter()
.map(|addr| { addr.to_string() })
.collect::<Vec<String>>()
.join(", ")
);
}
let _ = sh_println!(
"Listening on {}",
self.addresses
.iter()
.map(|addr| { addr.to_string() })
.collect::<Vec<String>>()
.join(", ")
);
}

/// The address of the launched server.
Expand Down

0 comments on commit 931374b

Please sign in to comment.