From 3eb140cc9ab6411c8698180c05e3e6c3fbfd8023 Mon Sep 17 00:00:00 2001 From: Bruno Galvao Date: Fri, 17 May 2024 19:23:21 +0900 Subject: [PATCH] cargo fmt --- crates/pop-cli/src/commands/up/parachain.rs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/crates/pop-cli/src/commands/up/parachain.rs b/crates/pop-cli/src/commands/up/parachain.rs index 34f8de3b..2104a450 100644 --- a/crates/pop-cli/src/commands/up/parachain.rs +++ b/crates/pop-cli/src/commands/up/parachain.rs @@ -159,10 +159,13 @@ impl ZombienetCommand { } } -pub(crate) async fn run_custom_command(spinner: &ProgressBar, command: &str) -> Result<(), anyhow::Error> { +pub(crate) async fn run_custom_command( + spinner: &ProgressBar, + command: &str, +) -> Result<(), anyhow::Error> { spinner.set_message(format!("Running command: {}", command.to_string())); sleep(Duration::from_secs(15)).await; - + // Split the command into the base command and arguments let mut parts = command.split_whitespace(); let base_command = parts.next().expect("Command cannot be empty"); @@ -194,13 +197,13 @@ mod tests { #[tokio::test] async fn test_run_custom_command() -> Result<(), anyhow::Error> { let spinner = ProgressBar::new(1); - + // Define the command to be executed let command = "echo 2 + 2"; - + // Call the run_custom_command function run_custom_command(&spinner, command).await?; - + Ok(()) } -} \ No newline at end of file +}