Skip to content

Commit

Permalink
fix: do not throw error if pyproject.toml is in node_modules (#5470)
Browse files Browse the repository at this point in the history
  • Loading branch information
aikebah committed Feb 18, 2023
2 parents 499ef56 + 926dc48 commit c187bca
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,8 @@ private void ensureLock(File parent) throws AnalysisException {
final File lock = new File(parent, POETRY_LOCK);
final File requirements = new File(parent, "requirements.txt");
final boolean found = lock.isFile() || requirements.isFile();
if (!found) {
//do not throw an error if the pyproject.toml is in the node_modules (#5464).
if (!found && !parent.toString().contains("node_modules")) {
throw new AnalysisException("Python `pyproject.toml` found and there "
+ "is not a `poetry.lock` or `requirements.txt` - analysis will be incomplete");
}
Expand Down

0 comments on commit c187bca

Please sign in to comment.