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

fix: handle empty rm with xargs #3

Merged
merged 1 commit into from
Aug 13, 2024

Conversation

esolitos
Copy link
Contributor

@esolitos esolitos commented Aug 13, 2024

What

  • Adds the --no-run-if-empty argument to xargs to ensure the rm command is not run without arguments.
  • Handles the case where grep exits with status code 1 because no matches are found.

Why

This ensures that if no file is matched in the "Clean redirections" step the workflow won't fail.

Example:
https://github.com/vespa-engine/sample-apps/actions/runs/10370346912/job/28708010858

  • image
  • image

I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.

@esolitos esolitos self-assigned this Aug 13, 2024
@esolitos esolitos requested a review from ean August 13, 2024 13:16
@esolitos esolitos marked this pull request as ready for review August 13, 2024 13:16
@esolitos esolitos requested a review from glebashnik August 13, 2024 13:32
@esolitos esolitos force-pushed the remove-redirect-files-before-link-check branch 3 times, most recently from b747c6a to 6b3a828 Compare August 13, 2024 13:45
@esolitos esolitos marked this pull request as draft August 13, 2024 13:46
@esolitos esolitos force-pushed the remove-redirect-files-before-link-check branch 5 times, most recently from 7a64a00 to ff0c241 Compare August 13, 2024 14:39
@esolitos esolitos marked this pull request as ready for review August 13, 2024 14:41
@ean ean merged commit a157bc1 into main Aug 13, 2024
2 checks passed
@ean ean deleted the remove-redirect-files-before-link-check branch August 13, 2024 17:59
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.

2 participants