diff options
author | Matthias Beyer <matthias.beyer@atos.net> | 2021-04-22 10:21:45 +0200 |
---|---|---|
committer | Matthias Beyer <matthias.beyer@atos.net> | 2021-04-22 10:21:46 +0200 |
commit | e16f3cf50879bf97a27ac5afc2b85429b28d62ed (patch) | |
tree | a8170eeecdcb1feeddc65f38ef9f2baf7ba7d0e2 | |
parent | 38b6ded40c6d840c9d3951f0a082cd55b1b0109c (diff) |
Fix: If no, return
Fixes a bug where the return value of the function was not used.
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
-rw-r--r-- | src/commands/endpoint.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/commands/endpoint.rs b/src/commands/endpoint.rs index 5338978..051d4fe 100644 --- a/src/commands/endpoint.rs +++ b/src/commands/endpoint.rs @@ -247,7 +247,9 @@ async fn containers_prune(endpoint_names: Vec<EndpointName>, .await?; let prompt = format!("Really delete {} Containers?", stats.iter().flatten().count()); - dialoguer::Confirm::new().with_prompt(prompt).interact()?; + if !dialoguer::Confirm::new().with_prompt(prompt).interact()? { + return Ok(()) + } stats.into_iter() .map(Vec::into_iter) |