Compare commits
2 Commits
24fec093d2
...
b107231e46
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b107231e46 | ||
|
|
0583eecf81 |
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -186,7 +186,7 @@ checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "multi-ssh"
|
name = "multi-ssh"
|
||||||
version = "0.1.0"
|
version = "0.2.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap",
|
"clap",
|
||||||
"homedir",
|
"homedir",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "multi-ssh"
|
name = "multi-ssh"
|
||||||
version = "0.1.0"
|
version = "0.2.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|||||||
@ -7,27 +7,27 @@ use std::iter::once;
|
|||||||
use std::process::{Command, ExitStatus, Output};
|
use std::process::{Command, ExitStatus, Output};
|
||||||
|
|
||||||
pub trait LogRunnable {
|
pub trait LogRunnable {
|
||||||
fn run(&mut self, logger: &Logger) -> Result<(), CommandSpecificError<ExecutionError>>;
|
fn run(&mut self, logger: &Logger) -> Result<(), CommandSpecificError<'_, ExecutionError>>;
|
||||||
fn collect_output(&mut self) -> Result<Output, CommandSpecificError<ExecutionError>>;
|
fn collect_output(&mut self) -> Result<Output, CommandSpecificError<'_, ExecutionError>>;
|
||||||
fn collect_full_output(&mut self) -> Result<Output, CommandSpecificError<StartError>>;
|
fn collect_full_output(&mut self) -> Result<Output, CommandSpecificError<'_, StartError>>;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl LogRunnable for Command {
|
impl LogRunnable for Command {
|
||||||
fn run(&mut self, logger: &Logger) -> Result<(), CommandSpecificError<ExecutionError>> {
|
fn run(&mut self, logger: &Logger) -> Result<(), CommandSpecificError<'_, ExecutionError>> {
|
||||||
run(self, logger).map_err(|error| CommandSpecificError {
|
run(self, logger).map_err(|error| CommandSpecificError {
|
||||||
command: self,
|
command: self,
|
||||||
error,
|
error,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fn collect_output(&mut self) -> Result<Output, CommandSpecificError<ExecutionError>> {
|
fn collect_output(&mut self) -> Result<Output, CommandSpecificError<'_, ExecutionError>> {
|
||||||
collect_output(self, None).map_err(|error| CommandSpecificError {
|
collect_output(self, None).map_err(|error| CommandSpecificError {
|
||||||
command: self,
|
command: self,
|
||||||
error,
|
error,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fn collect_full_output(&mut self) -> Result<Output, CommandSpecificError<StartError>> {
|
fn collect_full_output(&mut self) -> Result<Output, CommandSpecificError<'_, StartError>> {
|
||||||
collect_full_output(self).map_err(|error| CommandSpecificError {
|
collect_full_output(self).map_err(|error| CommandSpecificError {
|
||||||
command: self,
|
command: self,
|
||||||
error,
|
error,
|
||||||
|
|||||||
@ -79,7 +79,7 @@ enum Command {
|
|||||||
#[arg(short = 'd', long, default_value = "plugins")]
|
#[arg(short = 'd', long, default_value = "plugins")]
|
||||||
upload_directory: PathBuf,
|
upload_directory: PathBuf,
|
||||||
/// Skip the confirmation dialog
|
/// Skip the confirmation dialog
|
||||||
#[arg(long, default_value = "false")]
|
#[arg(short = 'y', long, default_value = "false")]
|
||||||
no_confirm: bool,
|
no_confirm: bool,
|
||||||
/// The prefix of the name of older versions of the file, which should be replaced or deleted
|
/// The prefix of the name of older versions of the file, which should be replaced or deleted
|
||||||
#[arg(short, long)]
|
#[arg(short, long)]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user