diff --git a/.changes/fix-fs-watcher-basedir.md b/.changes/fix-fs-watcher-basedir.md new file mode 100644 index 00000000..031056b7 --- /dev/null +++ b/.changes/fix-fs-watcher-basedir.md @@ -0,0 +1,5 @@ +--- +"fs": patch +--- + +Fixes `watch` and `watchImmediate` which previously ignored the `baseDir` parameter. diff --git a/plugins/fs/src/watcher.rs b/plugins/fs/src/watcher.rs index d83262a2..0795aa49 100644 --- a/plugins/fs/src/watcher.rs +++ b/plugins/fs/src/watcher.rs @@ -75,7 +75,7 @@ fn watch_debounced(on_event: Channel, rx: Receiver) { #[derive(Deserialize)] #[serde(rename_all = "camelCase")] pub struct WatchOptions { - dir: Option, + base_dir: Option, recursive: bool, delay_ms: Option, } @@ -96,7 +96,7 @@ pub async fn watch( &global_scope, &command_scope, path, - options.dir, + options.base_dir, )?); }