jbang icon indicating copy to clipboard operation
jbang copied to clipboard

fix: testing that user doesn't pass folder to --cp

Open quintesse opened this issue 6 months ago • 2 comments

Fixes #2045

Summary by Sourcery

Disallow users from passing directories to the --cp option by validating classpath entries and throwing an error when a directory is detected, and ensure this validation runs across all CLI commands.

Bug Fixes:

  • Reject directories passed to --cp and report an illegal argument error

Enhancements:

  • Introduce a shared validate() method for DependencyInfoMixin and invoke it in all relevant commands

Tests:

  • Add a test to verify that passing a folder to --cp raises an IllegalArgumentException

quintesse avatar Jun 06 '25 10:06 quintesse