build.rs 462 B

12345678910111213141516
  1. use std::process::Command;
  2. fn main() {
  3. println!("cargo:rerun-if-changed=interpreter.ts");
  4. match Command::new("tsc").spawn() {
  5. Ok(_) => println!("Was spawned :)"),
  6. Err(e) => {
  7. if let std::io::ErrorKind::NotFound = e.kind() {
  8. println!("`tsc` was not found! Not going to generate new interpreter")
  9. } else {
  10. println!("Some strange error occurred :(");
  11. }
  12. }
  13. }
  14. }