summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.builds/debian.yml3
-rw-r--r--deny.toml1
-rw-r--r--src/commands/endpoint_container.rs32
3 files changed, 25 insertions, 11 deletions
diff --git a/.builds/debian.yml b/.builds/debian.yml
index cd1b785..a5619a5 100644
--- a/.builds/debian.yml
+++ b/.builds/debian.yml
@@ -13,6 +13,9 @@ tasks:
- lint-licenses: |
cd butido
PATH="$HOME/.cargo/bin:$PATH" cargo deny check licenses
+ - lint-bans: |
+ cd butido
+ PATH="$HOME/.cargo/bin:$PATH" cargo deny check bans
- lint-sources: |
cd butido
PATH="$HOME/.cargo/bin:$PATH" cargo deny check sources
diff --git a/deny.toml b/deny.toml
index 57ee31c..4d12353 100644
--- a/deny.toml
+++ b/deny.toml
@@ -48,6 +48,7 @@ allow = [
deny = [
# Each entry the name of a crate and a version range. If version is
# not specified, all versions will be matched.
+ { name = "fuchsia-cprng" }
]
# Certain crates/versions that will be skipped when doing duplicate detection.
diff --git a/src/commands/endpoint_container.rs b/src/commands/endpoint_container.rs
index 962b62c..abaf49e 100644
--- a/src/commands/endpoint_container.rs
+++ b/src/commands/endpoint_container.rs
@@ -73,23 +73,33 @@ pub async fn container(endpoint_names: Vec<EndpointName>,
kill(matches, container).await
},
Some(("delete", _)) => {
- confirm(format!("Really delete {}?", container_id))?;
- delete(container).await
+ if confirm(format!("Really delete {}?", container_id))? {
+ delete(container).await
+ } else {
+ Ok(())
+ }
},
Some(("start", _)) => {
- confirm(format!("Really start {}?", container_id))?;
- start(container).await
+ if confirm(format!("Really start {}?", container_id))? {
+ start(container).await
+ } else {
+ Ok(())
+ }
},
Some(("stop", matches)) => {
- confirm(format!("Really stop {}?", container_id))?;
- stop(matches, container).await
+ if confirm(format!("Really stop {}?", container_id))? {
+ stop(matches, container).await
+ } else {
+ Ok(())
+ }
},
Some(("exec", matches)) => {
- confirm({
- let commands = matches.values_of("commands").unwrap().collect::<Vec<&str>>();
- format!("Really run '{}' in {}?", commands.join(" "), container_id)
- })?;
- exec(matches, container).await
+ let commands = matches.values_of("commands").unwrap().collect::<Vec<&str>>();
+ if confirm(format!("Really run '{}' in {}?", commands.join(" "), container_id))? {
+ exec(matches, container).await
+ } else {
+ Ok(())
+ }
},
Some(("inspect", _)) => inspect(container).await,
Some((other, _)) => Err(anyhow!("Unknown subcommand: {}", other)),