From f6db50a810268ad142d7ebc208e3e8ed32ee2153 Mon Sep 17 00:00:00 2001 From: cmhms Date: Sat, 12 Apr 2025 00:49:48 +0800 Subject: [PATCH] fix: mise watch forward --exts and --filter to watchexec (#4826) mise watch not forward --exts and --filter args to watchexec --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> --- src/cli/watch.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/cli/watch.rs b/src/cli/watch.rs index 45f45ed1e..b3e6e056b 100644 --- a/src/cli/watch.rs +++ b/src/cli/watch.rs @@ -156,6 +156,18 @@ impl Watch { args.push(path.to_string_lossy().to_string()); } } + if !self.watchexec.filter_extensions.is_empty() { + for ext in &self.watchexec.filter_extensions { + args.push("--exts".to_string()); + args.push(ext.to_string()); + } + } + if !self.watchexec.filter_patterns.is_empty() { + for pattern in &self.watchexec.filter_patterns { + args.push("--filter".to_string()); + args.push(pattern.to_string()); + } + } if let Some(watch_file) = &self.watchexec.watch_file { args.push("--watch-file".to_string()); args.push(watch_file.to_string_lossy().to_string());