fix: log error output when inotify limit is exceeded

closes #472
This commit is contained in:
Caleb Webber 2020-11-05 19:29:16 -05:00
parent 68e646f8aa
commit d61b4e5a13
No known key found for this signature in database
GPG key ID: 9A96661E149FA403

View file

@ -119,7 +119,12 @@ fn main() {
verify(&exercises, verbose).unwrap_or_else(|_| std::process::exit(1)); 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!( println!(
"{emoji} All exercises completed! {emoji}", "{emoji} All exercises completed! {emoji}",
emoji = Emoji("🎉", "") emoji = Emoji("🎉", "")