Add a bunch of TODO items
This commit is contained in:
parent
4f75581c8b
commit
affdc29df9
@ -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))
|
||||
|
||||
@ -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())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user