Skip to content

Commit

Permalink
Use current dir as fallback watch location
Browse files Browse the repository at this point in the history
Watch the current working directory if no auxiliary directory is set.

See #679.
  • Loading branch information
pfoerster committed Jul 28, 2022
1 parent b175fcf commit e7906cf
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
}
Expand Down

0 comments on commit e7906cf

Please sign in to comment.