summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <matthias.beyer@atos.net>2021-04-22 10:21:45 +0200
committerMatthias Beyer <matthias.beyer@atos.net>2021-04-22 12:00:33 +0200
commit5cab13445afc2ac1852f0a3380ceab14d24302b3 (patch)
tree3fcbc434856e02370eb87ac626b7b43dfc6f0a6e
parent555dc844dcd7c50e198b072abb8aa3f43d969660 (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> (cherry picked from commit e16f3cf50879bf97a27ac5afc2b85429b28d62ed)
-rw-r--r--src/commands/endpoint.rs4
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)