Skip to content

fix: skip pyproject.toml unless it contains tool.poetry before ensuring lockfiles#6681

Merged
jeremylong merged 1 commit intodependency-check:mainfrom
maxgip:scratch/fix-poetry
May 25, 2024
Merged

fix: skip pyproject.toml unless it contains tool.poetry before ensuring lockfiles#6681
jeremylong merged 1 commit intodependency-check:mainfrom
maxgip:scratch/fix-poetry

Conversation

@maxgip
Copy link
Copy Markdown
Contributor

@maxgip maxgip commented May 22, 2024

Fixes Issue #5971

Description of Change

Even after this PR was merged I am encountering the issue found in #5971. When scanning a dependency with a pyproject.toml file that does not use Poetry, an exception is still thrown.

The changes in this PR check if "tool.poetry" exists in pyproject.toml before checking that a lockfile (poetry.lock, requirements.txt) exist so that we can return gracefully if Poetry is not present instead of throwing an exception.

Have test cases been added to cover the new functionality?

yes, but am open to adding more if needed

@boring-cyborg boring-cyborg Bot added core changes to core tests test cases labels May 22, 2024
@jeremylong jeremylong added this to the 10.0 milestone May 23, 2024
@jeremylong jeremylong merged commit 6c0ac76 into dependency-check:main May 25, 2024
@jeremylong
Copy link
Copy Markdown
Collaborator

Thanks for the PR!

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Dec 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

core changes to core tests test cases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants