Formatted files

This commit is contained in:
Syrus Akbary
2018-11-28 13:25:56 -08:00
parent 02477b6e5e
commit 80ddc759a1
9 changed files with 83 additions and 73 deletions

View File

@ -1,17 +1,22 @@
//! When wasmer self-update is executed, this is what gets executed
use std::process::{Command, Stdio};
use std::io;
use std::process::{Command, Stdio};
pub fn self_update() {
println!("Fetching latest installer");
let cmd = Command::new("curl").arg("https://get.wasmer.io").arg("-sSfL")
.stdout(Stdio::piped()).spawn().unwrap();
let cmd = Command::new("curl")
.arg("https://get.wasmer.io")
.arg("-sSfL")
.stdout(Stdio::piped())
.spawn()
.unwrap();
let mut the_process = Command::new("sh")
.stdin(cmd.stdout.unwrap())
.stdout(Stdio::inherit())
.spawn()
.ok().expect("Failed to execute.");
let mut the_process = Command::new("sh")
.stdin(cmd.stdout.unwrap())
.stdout(Stdio::inherit())
.spawn()
.ok()
.expect("Failed to execute.");
the_process.wait();
}