Advertisement
Guest User

Untitled

a guest
Apr 20th, 2017
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rust 0.59 KB | None | 0 0
  1. fn getStr() -> String {
  2.     fs::copy("../client/src/elm/Main.elm",
  3.              "../client/src/elm/Main.elm.bak")
  4.             .expect("file not copied");
  5.     let stdout: Vec<u8>;
  6.  
  7.     stdout = Command::new("node")
  8.             .current_dir(&Path::new("../client"))
  9.             .arg("./node_modules/elm-static-html/index.js")
  10.             .arg("-f")
  11.             .arg("src/elm/Main.elm")
  12.             .output()
  13.             .expect("elm-static-html command failed to start")
  14.             .stdout;
  15.  
  16.  
  17.     }
  18.     println!("Read {:?} ", stdout);
  19.  
  20.     // String::from_utf8_lossy(&*stdout)
  21.     stdout
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement