Skip to content

Commit af5098f

Browse files
committed
Simply Foundry backend's command_to_build_test
1 parent efde37e commit af5098f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

backends/src/foundry/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,8 @@ impl RunLow for Foundry {
397397
// passes them to the build command as well. This causes problems when the test command accepts
398398
// arguments that the build command doesn't. A workaround is to use, for the "build" command, a
399399
// test command that runs exactly zero tests.
400+
// smoelius: Recent versions of Foundry output `Error: No tests to run` and exit with a non-zero
401+
// status. So just return `forge build` like `command_to_build_source_file` above.
400402
fn command_to_build_test(
401403
&self,
402404
context: &LightContext,
@@ -405,7 +407,7 @@ impl RunLow for Foundry {
405407
) -> Command {
406408
let mut command = Command::new("forge");
407409
command.current_dir(context.root.as_path());
408-
command.args(["test", "--match-test='^$'"]);
410+
command.arg("build");
409411
command
410412
}
411413

0 commit comments

Comments
 (0)