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

Add a flag to have zed exit with code 1 on check failure #246

Merged
merged 1 commit into from
Jun 28, 2023

Conversation

josephschorr
Copy link
Member

Fixes #69

@@ -73,6 +74,7 @@ func RegisterPermissionCmd(rootCmd *cobra.Command) *cobra.Command {
_ = checkCmd.Flags().MarkHidden("revision")
checkCmd.Flags().Bool("explain", false, "requests debug information from SpiceDB and prints out a trace of the requests")
checkCmd.Flags().Bool("schema", false, "requests debug information from SpiceDB and prints out the schema used")
checkCmd.Flags().Bool("error-on-no-permission", false, "if true, zed will return exit code 1 if subject does not have unconditional permission")
Copy link
Member

Choose a reason for hiding this comment

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

bike shedding but maybe --exit-1-without-membership? I don't really like either

Can we find prior art for a flag like this in other software?

Copy link
Member Author

Choose a reason for hiding this comment

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

I did a cursory search but couldn't find anything before I came up with this name randomly. I'm fine with whatever

Copy link
Member

@jzelinskie jzelinskie left a comment

Choose a reason for hiding this comment

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

We can always rename it if something comes up.

@jzelinskie jzelinskie added this pull request to the merge queue Jun 28, 2023
Merged via the queue into authzed:main with commit bd74043 Jun 28, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jun 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add flag for check to exit(1) on false permissionship
2 participants