Skip to content

Commit

Permalink
Merge pull request #582 from seeplusplus/inotify-watch-error
Browse files Browse the repository at this point in the history
fix: log error output when inotify limit is exceeded
  • Loading branch information
fmoko authored Nov 7, 2020
2 parents 68e646f + d61b4e5 commit a7ddd74
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 a7ddd74

Please sign in to comment.