From 628e589bcda538f5f5d7666a4c9ba82ce3ee66df Mon Sep 17 00:00:00 2001 From: Laurenz Date: Tue, 28 Mar 2023 14:54:39 +0200 Subject: [PATCH] Watch root directory instead of current one --- cli/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/src/main.rs b/cli/src/main.rs index 69bac9408..64108a06e 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -214,9 +214,9 @@ fn compile(command: CompileCommand) -> StrResult<()> { let mut watcher = RecommendedWatcher::new(tx, notify::Config::default()) .map_err(|_| "failed to watch directory")?; - // Watch this directory recursively. + // Watch root directory recursively. watcher - .watch(Path::new("."), RecursiveMode::Recursive) + .watch(&world.root, RecursiveMode::Recursive) .map_err(|_| "failed to watch directory")?; // Handle events.