From e16f3cf50879bf97a27ac5afc2b85429b28d62ed Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Thu, 22 Apr 2021 10:21:45 +0200 Subject: Fix: If no, return Fixes a bug where the return value of the function was not used. Signed-off-by: Matthias Beyer --- src/commands/endpoint.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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, .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) -- cgit v1.2.3