mirror of
https://github.com/watchexec/watchexec.git
synced 2024-09-29 22:51:33 +02:00
wrap ioerror when it represents oserror E2BIG
This commit is contained in:
parent
cca7b19283
commit
2615a1de7c
13
src/error.rs
13
src/error.rs
@ -33,7 +33,18 @@ impl From<globset::Error> for Error {
|
|||||||
|
|
||||||
impl From<io::Error> for Error {
|
impl From<io::Error> for Error {
|
||||||
fn from(err: io::Error) -> Self {
|
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 New Issue
Block a user