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 gyro diff for a non-zero exit code when a pending diff is detected #410

Open
mlivas opened this issue Jan 4, 2024 · 0 comments

Comments

@mlivas
Copy link

mlivas commented Jan 4, 2024

When attempting to automate gyro changes without direct human involvement (via a bash script), I could not find a straightforward way to determine if there are currently pending diffs via the gyro diff command.

Adding a flag to the gyro diff command to provide a non-zero exit code when a diff is detected would enable this use-case, while leaving the default behavior as-is. Helm and Helmfile's diff commands offer this functionality via the --detailed-exitcode flag.

I found a workaround via echo n | gyro up, which exits with zero when there is no diff detected, and will both decline to apply any pending diffs and provide a non-zero exit code. This is not ideal as gyro up may present multiple prompts for changes that need to declined.

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

No branches or pull requests

1 participant