Skip to content
This repository has been archived by the owner on Jan 18, 2025. It is now read-only.

Commit

Permalink
Better error handling
Browse files Browse the repository at this point in the history
Probably help debugging (see comments on #25)
  • Loading branch information
passcod authored Apr 18, 2017
1 parent 0308fd0 commit e57e8b5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,12 @@ fn main() {
env_logger::init().unwrap();

let opts = get_options(&matches);
let status = Command::new("watchexec").args(&opts).status();
info!("Exit status: {:?}", status);
let status = Command::new("watchexec")
.args(&opts)
.status()
.expect("Failed to execute watchexec! Make sure it's installed and in your PATH.");

if !status.success() {
error!("Oh no! Watchexec exited with: {}", status);
}
}

0 comments on commit e57e8b5

Please sign in to comment.