mirror of
https://github.com/typst/typst
synced 2025-05-14 04:56:26 +08:00
Watch root directory instead of current one
This commit is contained in:
parent
6fa33fda6e
commit
628e589bcd
@ -214,9 +214,9 @@ fn compile(command: CompileCommand) -> StrResult<()> {
|
|||||||
let mut watcher = RecommendedWatcher::new(tx, notify::Config::default())
|
let mut watcher = RecommendedWatcher::new(tx, notify::Config::default())
|
||||||
.map_err(|_| "failed to watch directory")?;
|
.map_err(|_| "failed to watch directory")?;
|
||||||
|
|
||||||
// Watch this directory recursively.
|
// Watch root directory recursively.
|
||||||
watcher
|
watcher
|
||||||
.watch(Path::new("."), RecursiveMode::Recursive)
|
.watch(&world.root, RecursiveMode::Recursive)
|
||||||
.map_err(|_| "failed to watch directory")?;
|
.map_err(|_| "failed to watch directory")?;
|
||||||
|
|
||||||
// Handle events.
|
// Handle events.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user