Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(forge build): --watch flag now watches foundry.toml config… #9148

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions crates/forge/bin/cmd/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,12 @@ impl BuildArgs {
/// Returns the [`watchexec::InitConfig`] and [`watchexec::RuntimeConfig`] necessary to
/// bootstrap a new [`watchexe::Watchexec`] loop.
pub(crate) fn watchexec_config(&self) -> Result<watchexec::Config> {
// use the path arguments or if none where provided the `src` dir
// Use the path arguments or if none where provided the `src`, `test` and `script`
// directories as well as the `foundry.toml` configuration file.
self.watch.watchexec_config(|| {
let config = Config::from(self);
[config.src, config.test, config.script]
let foundry_toml: PathBuf = config.root.0.join(Config::FILE_NAME);
[config.src, config.test, config.script, foundry_toml]
})
}
}
Expand Down
Loading