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