aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2016-06-02 20:18:13 -0400
committerbnewbold <bnewbold@robocracy.org>2016-06-02 20:18:13 -0400
commitc0e1c1f0330961eb56d21195e012cdbf488a6359 (patch)
tree7e213b3758aa36db1ece4b6b1a314d0f0f0e691b /src
parent84df513ac4c7bc93bfedc98dacd3b9e8d1358fa7 (diff)
downloaducp-c0e1c1f0330961eb56d21195e012cdbf488a6359.tar.gz
ucp-c0e1c1f0330961eb56d21195e012cdbf488a6359.zip
client: handle remote error properly
Diffstat (limited to 'src')
-rw-r--r--src/client.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client.rs b/src/client.rs
index b7aeb74..4749c51 100644
--- a/src/client.rs
+++ b/src/client.rs
@@ -38,7 +38,8 @@ pub fn run_client(host: &str, local_file: &str, remote_file: &str, remote_is_dir
let ssh_output = ssh_cmd.output().expect("couldn't get SSH sub-process output");
if !ssh_output.status.success() {
- panic!("SSH problem: {}", String::from_utf8_lossy(&ssh_output.stderr));
+ println!("Error on remote end: {}", String::from_utf8_lossy(&ssh_output.stderr));
+ exit(-1);
}
let reply = String::from_utf8_lossy(&ssh_output.stdout);