Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: do not throw error if pyproject.toml is in node_modules #5470

Merged
merged 1 commit into from
Feb 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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