Skip to content

Commit

Permalink
Fix OpenJDK path detection (#1452)
Browse files Browse the repository at this point in the history
This fixes several severe issues with c198a44, which was incorrectly
matching whole path segments.
  • Loading branch information
cd-work authored Jun 18, 2024
1 parent c3416ca commit 1c1ed6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cli/src/commands/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ fn jdk_paths() -> Result<Vec<PathBuf>> {
.flatten()
.filter_map(|entry| {
let path = entry.path();
(path.starts_with("java") && path.ends_with("openjdk")).then_some(path)
path.to_str()?.ends_with("openjdk").then_some(path)
})
.collect();
Ok(paths)
Expand Down

0 comments on commit 1c1ed6a

Please sign in to comment.