Skip to content

Commit

Permalink
fix: log error output when inotify limit is exceeded
Browse files Browse the repository at this point in the history
  • Loading branch information
seeplusplus authored and JuniousY committed Jan 28, 2021
1 parent a7061f1 commit 3fe9389
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,12 @@ fn main() {
verify(&exercises, verbose).unwrap_or_else(|_| std::process::exit(1));
}

if matches.subcommand_matches("watch").is_some() && watch(&exercises, verbose).is_ok() {
if matches.subcommand_matches("watch").is_some() {
if let Err(e) = watch(&exercises, verbose) {
println!("Error: Could not watch your progess. Error message was {:?}.", e);
println!("Most likely you've run out of disk space or your 'inotify limit' has been reached.");
std::process::exit(1);
}
println!(
"{emoji} All exercises completed! {emoji}",
emoji = Emoji("🎉", "★")
Expand Down

0 comments on commit 3fe9389

Please sign in to comment.