Skip to content

Conversation

@majiayu000
Copy link

Fixes #800

Changes

  • Auto-load data directory when no --data flag is specified and the directory exists
  • Updated documentation for test and verify commands to describe this behavior
  • Gracefully skips if the data directory doesn't exist

Add default data loading path for the --data flag. When no --data flag
is specified and a 'data' directory exists in the current working
directory, it will be automatically used as the data directory.

This feature allows for convenient consumption of bundles that include
both policies and data without requiring explicit --data flag usage.

The implementation:
- Checks for the existence of a 'data' directory at runtime
- Only applies the default when no explicit --data flag is provided
- Silently skips if the default directory doesn't exist

Fixes open-policy-agent#800

Signed-off-by: majiayu000 <[email protected]>
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.

Default loading path for data?

1 participant