You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For me, this makes bundles hard to use effectively, because the bundle isn't enough, you need to make sure that the consuming conftest call adds a -d flag. If there was a default policy/data folder, then I could publish bundles and consume them easily. (Note: the --combine flag is one obstacle, but can deal with that problem later)
Hey, I want to pick up this issue.
Just a question on how the default value should be handled when loading data files if the default location doesn't exist? My current thought is to check when a folder not found error is thrown and then check if it is using the default path location and if so continue without throwing that error. Or would there be a better way?
Activity
jalseth commentedon Mar 25, 2023
This seems reasonable to me. It would be straightforward to set default values for the
--dataflaghttps://github.com/search?q=data++StringSliceP+repo%3Aopen-policy-agent%2Fconftest+path%3Ainternal%2F+language%3AGo+language%3AGo+language%3AGo+language%3AGo+language%3AGo+language%3AGo+language%3AGo+language%3AGo&type=Code&ref=advsearch&l=Go&l=Go
k11y commentedon Jul 20, 2024
Hey, I want to pick up this issue.
Just a question on how the default value should be handled when loading data files if the default location doesn't exist? My current thought is to check when a folder not found error is thrown and then check if it is using the default path location and if so continue without throwing that error. Or would there be a better way?
fix: Adds default path for data flag
feat: add default data loading path
feat: auto-load 'data' directory when --data flag is not specified
alliasgher commentedon Apr 25, 2026
Opened #1322 for this.
feat(test,verify): auto-load policy/data when --data is unset
feat: auto-load policy/data when --data is unset