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

docs(config): add GRYPE_CONFIG docs #2380

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kema-dev
Copy link

Why

  • I started using scan-action and got disappointed when I tried to add a config file, this made me create this PR. However, I discovered here that GRYPE_CONFIG can be used to do so! I would like to clarify the docs about this possibility.

How

  • Just add a few words in the readme

(Also added some whitespace tidying)

@kema-dev kema-dev force-pushed the docs(config)-add-GRYPE_CONFIG-docs branch from 7a5c942 to 9b25331 Compare January 17, 2025 20:53
README.md Outdated
@@ -673,10 +673,13 @@ Default configuration search paths (see all with `grype config locations`):
Use `grype config` to print a sample config file to stdout.
Use `grype config --load` to print the current config after loading all values to stdout.

You can specify files directly using the `--config` / `-c` flags to provide your own configuration files/paths:
You can specify files directly using the environment variable `GRYPE_CONFIG` or the `--config` / `-c` flags to provide your own configuration files/paths:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to include an example of this, since someone specifying this on the command line probably would just use -c and that would be the preferred way rather than using an environment variable that could be overridden. I think it would make sense to revert the dependency here, but add a blurb secondary to the -c, so something like:

You can specify files directly using the --config / -c flags (or environment variable GRYPE_CONFIG) to provide your own configuration files/paths:

... would this have been sufficient for you to discover this detail?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Completely agree! Fixed

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.

2 participants