Skip to content

Commit c98db66

Browse files
joebonrichieermo
authored andcommitted
boulder/draft: Ensure we don't match against empty license strings
1 parent b78ad10 commit c98db66

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

boulder/src/draft/licenses.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ pub fn match_licences(dir: &Path, spdx_dir: &Path) -> Result<Vec<String>, Error>
100100
.par_iter()
101101
.filter_map(|license| {
102102
let license_content = std::fs::read_to_string(license).ok();
103-
if license_content.is_some() {
103+
if license_content.as_ref().is_some_and(|s| !s.is_empty()) {
104104
Some(license_content)
105105
} else {
106106
println!("{} | Failed to parse {}", "Warning".yellow(), license.display());

0 commit comments

Comments
 (0)