Skip to content

fix(ci): handle grep exit code in snap-update workflow#463

Merged
lucabello merged 1 commit into
mainfrom
fix/snap-update-grep-exit-code
Jun 8, 2026
Merged

fix(ci): handle grep exit code in snap-update workflow#463
lucabello merged 1 commit into
mainfrom
fix/snap-update-grep-exit-code

Conversation

@lucabello

Copy link
Copy Markdown
Contributor

When the snap update workflow runs and there are no changes, grep -cv '^??' returns exit code 1 because grep exits non-zero when it finds zero matches. This causes the workflow step to fail even though no-changes is a valid outcome.

Add || true to prevent the exit code from propagating.

Fixes: https://github.com/canonical/grafana-agent-snap/actions/runs/27128408845/job/80063027049

@lucabello lucabello requested a review from a team as a code owner June 8, 2026 11:51
@lucabello lucabello merged commit 521fdc3 into main Jun 8, 2026
1 check passed
@lucabello lucabello deleted the fix/snap-update-grep-exit-code branch June 8, 2026 11:52
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.

1 participant