enable stdout

parent fd449629
......@@ -15,6 +15,10 @@ const USER: &'static str = "placeholder_username";
const PASS: &'static str = "placeholder_password";
pub fn send_script() {
/* Goal here is to upload the shell script we will execute later
* We could read this in from a file, but that would mean
* that I have to ship failsafe as more than just a single binary
*/
let script: &'static str = r#"#!/usr/bin/env bash
set -u
set -o noglob
......@@ -78,9 +82,6 @@ fi
}
pub fn try_start() -> (bool, String) {
// ENOTIMPLEMENTED
//return (false, "ENOIMEPLEMENTED".to_string())
/* Goal of this function is to SSH to my mac
* And run a special idempotent shell/python shell shit
* to make sure zeta is running and responding.
......@@ -119,7 +120,8 @@ pub fn try_start() -> (bool, String) {
if success {
s.stdout().read_to_end(&mut buf).unwrap();
} else {
//s.stderr().read_to_end(&mut buf).unwrap();
// FIXME: this will crash if there's nothing in the buffer.
s.stderr().read_to_end(&mut buf).unwrap();
}
return (
success,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment