Skip to content

Commit 74f1e3e

Browse files
authored
fix: fix parsing with indented comments in requirements.txt (#236)
## Description fix: fix parsing with indented comments in requirements.txt fixes: #235 https://issues.redhat.com/browse/TC-3360 ## Checklist - [x] I have followed this repository's contributing guidelines. - [x] I will adhere to the project's code of conduct.
1 parent 26c2423 commit 74f1e3e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/io/github/guacsec/trustifyda/utils/PythonControllerBase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ private List<Map<String, Object>> getDependenciesImpl(
153153
try {
154154
linesOfRequirements =
155155
Files.readAllLines(requirementsPath).stream()
156-
.filter((line) -> !line.startsWith("#"))
156+
.filter((line) -> !line.trim().startsWith("#") && !line.trim().isEmpty())
157157
.map(String::trim)
158158
.collect(Collectors.toList());
159159
} catch (IOException e) {

0 commit comments

Comments
 (0)