Skip to content

Commit a7ddd74

Browse files
author
fmoko
authored
Merge pull request #582 from seeplusplus/inotify-watch-error
fix: log error output when inotify limit is exceeded
2 parents 68e646f + d61b4e5 commit a7ddd74

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,12 @@ fn main() {
119119
verify(&exercises, verbose).unwrap_or_else(|_| std::process::exit(1));
120120
}
121121

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

0 commit comments

Comments
 (0)