Use current dir as fallback watch location

Watch the current working directory if no auxiliary directory is set.

See #679.
This commit is contained in:
Patrick Förster 2022-07-28 18:16:43 +02:00
parent b175fcf903
commit e7906cfe85

View file

@ -747,9 +747,10 @@ impl Server {
)?;
}
if let Some(path) = &self.workspace.environment.options.aux_directory {
let _ = self.workspace.watch(path);
}
let _ = match &self.workspace.environment.options.aux_directory {
Some(path) => self.workspace.watch(path),
None => self.workspace.watch(&PathBuf::from(".")),
};
Ok(())
}