diff --git a/src/main.rs b/src/main.rs index 1b63ccd..bd74cf0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -119,6 +119,7 @@ fn main() -> Result<(), String> { Ok(ServerActions { server, actions: { + //TODO don't use debug values here, use joiner let output = ShellCmd::new("ssh") .arg(&server.ssh_name) .arg(format!( @@ -205,6 +206,7 @@ fn main() -> Result<(), String> { for file_action in server_actions.actions { match file_action.kind { Action::Add | Action::Replace => { + //TODO replace with joiner let mut destination = OsString::from(&server.ssh_name); destination.push(":"); destination.push(&server.server_directory_path); @@ -221,6 +223,7 @@ fn main() -> Result<(), String> { .map_err(|e| format!("failed to wait for upload: {e}"))?; } Action::Delete => { + //TODO don't use debug values here, use joiner ShellCmd::new("ssh") .arg(&server.ssh_name) .arg(format!( @@ -233,6 +236,7 @@ fn main() -> Result<(), String> { .map_err(|e| format!("failed to wait for delete command: {e}"))?; } Action::Rename { new_name } => { + //TODO don't use debug values, use joiner ShellCmd::new("ssh") .arg(&server.ssh_name) .arg(format!( @@ -254,6 +258,7 @@ fn main() -> Result<(), String> { start_ssh_agent()?; for server in servers { println!("Running command on '{}'...", server.ssh_name); + //TODO don't use debug values, use joiner ShellCmd::new("ssh") .arg(server.ssh_name) .arg(format!("cd {:?}; {command}", server.server_directory_path)) diff --git a/src/server.rs b/src/server.rs index bdf6d99..75772dc 100644 --- a/src/server.rs +++ b/src/server.rs @@ -131,7 +131,7 @@ impl FromStr for Server { impl Display for Server { fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { - write!(f, "{}:{:?}", self.ssh_name, self.server_directory_path) + write!(f, "{}:{}", self.ssh_name, self.server_directory_path.to_string_lossy()) } }