Skip to content

Commit 78c19e1

Browse files
DaniPopesMerkleBoy
authored andcommitted
test: redact test which may install solc (foundry-rs#11534)
1 parent 64e6c91 commit 78c19e1

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

crates/cli/src/opts/build/core.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,18 +166,19 @@ impl BuildOpts {
166166
// Loads project's figment and merges the build cli arguments into it
167167
impl<'a> From<&'a BuildOpts> for Figment {
168168
fn from(args: &'a BuildOpts) -> Self {
169-
let mut figment = if let Some(ref config_path) = args.project_paths.config_path {
169+
let root = if let Some(config_path) = &args.project_paths.config_path {
170170
if !config_path.exists() {
171171
panic!("error: config-path `{}` does not exist", config_path.display())
172172
}
173173
if !config_path.ends_with(Config::FILE_NAME) {
174174
panic!("error: the config-path must be a path to a foundry.toml file")
175175
}
176176
let config_path = canonicalized(config_path);
177-
Config::figment_with_root(config_path.parent().unwrap())
177+
config_path.parent().unwrap().to_path_buf()
178178
} else {
179-
Config::figment_with_root(args.project_paths.project_root())
179+
args.project_paths.project_root()
180180
};
181+
let mut figment = Config::figment_with_root(root);
181182

182183
// remappings should stack
183184
let mut remappings = Remappings::new_with_remappings(args.project_paths.get_remappings())

crates/forge/tests/cli/test_cmd.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,7 @@ contract ATest is DSTest {
143143
);
144144

145145
cmd.arg("test").assert_success().stdout_eq(str![[r#"
146-
[COMPILING_FILES] with [SOLC_VERSION]
147-
[SOLC_VERSION] [ELAPSED]
146+
...
148147
Compiler run successful!
149148
150149
Ran 1 test for src/ATest.t.sol:ATest
@@ -3678,7 +3677,7 @@ contract CounterTest is Test {
36783677
}
36793678
}
36803679
"#
3681-
.replace("<url>", &rpc::next_http_rpc_endpoint()),
3680+
.replace("<url>", &rpc::next_http_archive_rpc_url()),
36823681
);
36833682

36843683
cmd.args(["test", "--mc", "CounterTest"]).assert_success().stdout_eq(str![[r#"

0 commit comments

Comments
 (0)