mirror of
https://github.com/watchexec/watchexec.git
synced 2024-11-16 09:08:37 +01:00
wrap ioerror when it represents oserror E2BIG
This commit is contained in:
parent
cca7b19283
commit
2615a1de7c
1 changed files with 12 additions and 1 deletions
13
src/error.rs
13
src/error.rs
|
@ -33,7 +33,18 @@ impl From<globset::Error> for Error {
|
|||
|
||||
impl From<io::Error> for Error {
|
||||
fn from(err: io::Error) -> Self {
|
||||
Self::Io(err)
|
||||
Self::Io(
|
||||
match err.raw_os_error() {
|
||||
Some(os_err) => match os_err {
|
||||
7 => {
|
||||
let msg = "There are so many changed files that the environment variables of the child process have been overrun. Try running with --no-meta or --no-environment.";
|
||||
io::Error::new(io::ErrorKind::Other, msg)
|
||||
},
|
||||
_ => err,
|
||||
}
|
||||
None => err,
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue