Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
brunopgalvao committed May 17, 2024
1 parent 67de9b3 commit 3eb140c
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions crates/pop-cli/src/commands/up/parachain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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(())
}
}
}

0 comments on commit 3eb140c

Please sign in to comment.