logo
pub async fn from_environment() -> (Vec<FilterFile>, Vec<Error>)
Expand description

Finds all filter files that apply to the current runtime.

This considers:

  • $XDG_CONFIG_HOME/watchexec/filter, as well as other locations (APPDATA on Windows…)
  • Files from the WATCHEXEC_FILTER_FILES environment variable (comma-separated)

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 from files not being found are silently ignored (the files are just not returned).