diff --git a/Cargo.lock b/Cargo.lock index 6f86d3d..b6db01a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -186,7 +186,7 @@ checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" [[package]] name = "multi-ssh" -version = "0.1.0" +version = "0.2.0" dependencies = [ "clap", "homedir", diff --git a/Cargo.toml b/Cargo.toml index a1f6658..a9bc08b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "multi-ssh" -version = "0.1.0" +version = "0.2.0" edition = "2021" [dependencies] diff --git a/src/command.rs b/src/command.rs index 7fc58ba..f2767b1 100644 --- a/src/command.rs +++ b/src/command.rs @@ -7,27 +7,27 @@ use std::iter::once; use std::process::{Command, ExitStatus, Output}; pub trait LogRunnable { - fn run(&mut self, logger: &Logger) -> Result<(), CommandSpecificError>; - fn collect_output(&mut self) -> Result>; - fn collect_full_output(&mut self) -> Result>; + fn run(&mut self, logger: &Logger) -> Result<(), CommandSpecificError<'_, ExecutionError>>; + fn collect_output(&mut self) -> Result>; + fn collect_full_output(&mut self) -> Result>; } impl LogRunnable for Command { - fn run(&mut self, logger: &Logger) -> Result<(), CommandSpecificError> { + fn run(&mut self, logger: &Logger) -> Result<(), CommandSpecificError<'_, ExecutionError>> { run(self, logger).map_err(|error| CommandSpecificError { command: self, error, }) } - fn collect_output(&mut self) -> Result> { + fn collect_output(&mut self) -> Result> { collect_output(self, None).map_err(|error| CommandSpecificError { command: self, error, }) } - fn collect_full_output(&mut self) -> Result> { + fn collect_full_output(&mut self) -> Result> { collect_full_output(self).map_err(|error| CommandSpecificError { command: self, error, diff --git a/src/main.rs b/src/main.rs index fe15b65..3919df3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -79,7 +79,7 @@ enum Command { #[arg(short = 'd', long, default_value = "plugins")] upload_directory: PathBuf, /// Skip the confirmation dialog - #[arg(long, default_value = "false")] + #[arg(short = 'y', long, default_value = "false")] no_confirm: bool, /// The prefix of the name of older versions of the file, which should be replaced or deleted #[arg(short, long)]