mirror of
https://github.com/watchexec/watchexec.git
synced 2024-09-29 14:41:35 +02:00
Hide io::errors when "waiting on process group"
This commit is contained in:
parent
c79d2726ba
commit
18a2b204e2
@ -2,17 +2,23 @@ use std::convert::Infallible;
|
|||||||
|
|
||||||
use clap::ArgMatches;
|
use clap::ArgMatches;
|
||||||
use miette::Result;
|
use miette::Result;
|
||||||
use watchexec::{config::InitConfig, handler::SyncFnHandler};
|
use tracing::error;
|
||||||
|
use watchexec::{config::InitConfig, error::RuntimeError, handler::SyncFnHandler};
|
||||||
|
|
||||||
pub fn init(_args: &ArgMatches<'static>) -> Result<InitConfig> {
|
pub fn init(_args: &ArgMatches<'static>) -> Result<InitConfig> {
|
||||||
let mut config = InitConfig::default();
|
let mut config = InitConfig::default();
|
||||||
config.on_error(SyncFnHandler::from(
|
config.on_error(SyncFnHandler::from(
|
||||||
|data| -> std::result::Result<(), Infallible> {
|
|data| -> std::result::Result<(), Infallible> {
|
||||||
// if let RuntimeError::IoError { .. } = data {
|
if let RuntimeError::IoError {
|
||||||
// // these are often spurious, so condemn them to -v only
|
about: "waiting on process group",
|
||||||
// error!("{}", data);
|
..
|
||||||
// return Ok(());
|
} = data
|
||||||
// }
|
{
|
||||||
|
// "No child processes" and such
|
||||||
|
// these are often spurious, so condemn them to -v only
|
||||||
|
error!("{}", data);
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
|
|
||||||
if cfg!(debug_assertions) {
|
if cfg!(debug_assertions) {
|
||||||
eprintln!("[[{:?}]]", data);
|
eprintln!("[[{:?}]]", data);
|
||||||
|
@ -177,7 +177,7 @@ pub async fn from_origin(path: impl AsRef<Path>) -> (Vec<IgnoreFile>, Vec<Error>
|
|||||||
/// - User-specific git ignore files (e.g. `~/.gitignore`)
|
/// - User-specific git ignore files (e.g. `~/.gitignore`)
|
||||||
/// - Git configurable ignore files (e.g. with `core.excludesFile` in system or user config)
|
/// - Git configurable ignore files (e.g. with `core.excludesFile` in system or user config)
|
||||||
/// - `$XDG_CONFIG_HOME/watchexec/ignore`, as well as other locations (APPDATA on Windows…)
|
/// - `$XDG_CONFIG_HOME/watchexec/ignore`, as well as other locations (APPDATA on Windows…)
|
||||||
/// - Files from the `WATCHEXEC_IGNORE_FILES` environment variable (comma-separated)
|
/// - Files from the `WATCHEXEC_IGNORE_FILES` environment variable (separated the same was as `PATH`)
|
||||||
///
|
///
|
||||||
/// All errors (permissions, etc) are collected and returned alongside the ignore files: you may
|
/// All errors (permissions, etc) are collected and returned alongside the ignore files: you may
|
||||||
/// want to show them to the user while still using whatever ignores were successfully found. Errors
|
/// want to show them to the user while still using whatever ignores were successfully found. Errors
|
||||||
|
Loading…
Reference in New Issue
Block a user