-
Notifications
You must be signed in to change notification settings - Fork 587
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
SYFT_CONFIG environment variable not supported #1986
Labels
enhancement
New feature or request
Comments
@AidanDelaney thanks for the report -- the priority order issue. This happens to be something that we just started working on. However, there is no option to use |
This was referenced Aug 2, 2023
kzantow
changed the title
Root options do not follow priority order
SYFT_CONFIG environment variable not supported
Aug 7, 2023
kzantow
added
enhancement
New feature or request
and removed
bug
Something isn't working
labels
Aug 7, 2023
This was referenced Sep 1, 2023
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What happened:
Running
SYFT_CONFIG=foo syft package
does not pick up the application config from filefoo
.What you expected to happen:
Running
syft -c bar packages
results in the expected errorunable to load config: unable to read application config="bar"
.I would expect the same error when the config flag is set using an environment variable
SYFT_CONFIG
.Steps to reproduce the issue:
SYFT_CONFIG=foo syft packages
Notice that the error
rror during command execution: an image/directory argument is required
is produced. It should fail when the application configuration file is not found.Anything else we need to know?:
The value of
configPath
is passed toApplication.LoadAllValues
. The decision on the value of top-level happens before we load values. The values of root options should come from a viper lookup, rather than from a pflag binding.This is related to #1143, but is a smaller scoped issue.
Environment:
syft version
: latestgit
cat /etc/os-release
or similar): macos & linuxThe text was updated successfully, but these errors were encountered: