Skip to content

Added a validation check to raise an error if a directory is passed to the --from-json option #4033

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

Closed
wants to merge 2 commits into from

Conversation

aayushkdev
Copy link
Contributor

@aayushkdev aayushkdev commented Dec 20, 2024

Fixes #3592

When the --from-json option is used, it currently allows directories as input, resulting in a crash. This issue was initially addressed in PR #3609, but the fix did not fully resolve the problem. As a result, the tool continues to crash when directories are passed to --from-json.

This PR aims to resolve the issue by adding validation checks for directories.

Tasks

  • Reviewed contribution guidelines
  • PR is descriptively titled 📑 and links the original issue above 🔗
  • Tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR
    Run tests locally to check for errors.
  • Commits are in uniquely-named feature branch and has no merge conflicts 📁
  • Updated documentation pages (if applicable)
  • Updated CHANGELOG.rst (if applicable)

@aayushkdev aayushkdev closed this Dec 22, 2024
@aayushkdev aayushkdev deleted the issue-#3592 branch December 22, 2024 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

scancode crash when using directory with --from-json
1 participant