summaryrefslogtreecommitdiff
path: root/cli/src/main.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-03-28 14:54:39 +0200
committerLaurenz <laurmaedje@gmail.com>2023-03-28 14:54:44 +0200
commit628e589bcda538f5f5d7666a4c9ba82ce3ee66df (patch)
tree1b56d2ec90d28a9326429ddb12b5e8dbdbb3c661 /cli/src/main.rs
parent6fa33fda6ee94b6f38bcbb4e805a33893bda2b27 (diff)
Watch root directory instead of current one
Diffstat (limited to 'cli/src/main.rs')
-rw-r--r--cli/src/main.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/src/main.rs b/cli/src/main.rs
index 69bac940..64108a06 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.