Skip to content

Commit cd31315

Browse files
authored
fix(fips): ignore test and build deps (#750)
# What? Sets `--edges=normal` to ignore build and test dependencies # Why? Unblock #695, since it uses `reqwest` when downloading the `libddwaf` binary
1 parent f37bb89 commit cd31315

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

bottlecap/build.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ fn check_forbidden_dependency(dependency_name: &str) -> Result<(), String> {
88
);
99

1010
// First run cargo tree to get dependency with detailed info
11+
// Use --edges normal to exclude build and test dependencies
1112
let output = Command::new("cargo")
1213
.args([
1314
"tree",
@@ -17,6 +18,7 @@ fn check_forbidden_dependency(dependency_name: &str) -> Result<(), String> {
1718
"--prefix-depth",
1819
"--features=fips",
1920
"--no-default-features",
21+
"--edges=normal",
2022
])
2123
.output()
2224
.map_err(|e| {
@@ -27,13 +29,15 @@ fn check_forbidden_dependency(dependency_name: &str) -> Result<(), String> {
2729
})?;
2830

2931
// Also get the complete dependency path to help debugging
32+
// Use --edges normal to exclude build and test dependencies
3033
let path_output = Command::new("cargo")
3134
.args([
3235
"tree",
3336
"-i",
3437
dependency_name,
3538
"--features=fips",
3639
"--no-default-features",
40+
"--edges=normal",
3741
])
3842
.output()
3943
.map_err(|e| {

0 commit comments

Comments
 (0)