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

Proposal for Extending CLI Arguments for Customization #279

Open
topikachu opened this issue Nov 13, 2024 · 1 comment
Open

Proposal for Extending CLI Arguments for Customization #279

topikachu opened this issue Nov 13, 2024 · 1 comment

Comments

@topikachu
Copy link

topikachu commented Nov 13, 2024

In our project, we often require additional arguments to customize the behavior of the package tool commands. For example:

  • For our npm project, we need to pass arguments like --force when resolving dependencies.
  • For Maven projects, we frequently use the -Dexcludes argument to exclude internal libraries.

To streamline this, I propose adding new CLI arguments such as --npm-args, --mvn-args, and similar options for other tools (like Yarn). This would allow users to specify custom arguments for different tools directly in the CLI.

If this approach sounds reasonable, I'd be happy to contribute an implementation that supports these options for npm, mvn, and yarn.

Let me know your thoughts!

@CarlTern
Copy link
Member

Hi topikachu, thank you for sharing your ideas on CLI argument extensions.

The 'resolve' command was designed to be a quick and simple way of automatically ensuring that you have all lock files within your repository generated prior to scanning with Debricked.

We have not focused on adding support for more advanced use cases since the command by default does not overwrite any existing lock files and we wanted to keep it as simple as possible with "sane defaults". If one requires specific arguments to be passed during resolution, it is therefore possible to run the commands on their own before running 'debricked resolve'.

If you would like to resolve manually, the exact way default resolution is being done in the command can be found in the README’s in each package managers folder here https://github.com/debricked/cli/tree/main/internal/resolution/pm.

To get some background for this particular issue, is the reason behind it to reduce the amount of commands that have to be run prior to a scan, or were you unaware of the default non-override behaviour of the ‘resolve’ command?

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

No branches or pull requests

2 participants