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>
This commit is contained in:
cmhms 2025-04-12 00:49:48 +08:00 committed by GitHub
parent 9ad2c17ec7
commit f6db50a810
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 12 additions and 0 deletions

View File

@ -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());