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

Prefer gtar if available #2767

Merged
merged 5 commits into from
Feb 17, 2025
Merged

Prefer gtar if available #2767

merged 5 commits into from
Feb 17, 2025

Conversation

cklin
Copy link
Contributor

@cklin cklin commented Feb 14, 2025

This PR changes the action to prefer gtar (over tar) if it is present.

On MacOS runner images, gtar points to GNU tar, which is more robust when extracting zstd archives.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Confirm the readme has been updated if necessary.
  • Confirm the changelog has been updated if necessary.

This refactoring commit records the name of the tar program in the new
TarVersion.name field and makes extractTarZst() use the new field
instead of the hardcoded name "tar". Code behavior remains unchanged
because currently TarVersion.name is always "tar".

This is the first step toward supporting a tar program under a different
executable name.
This commit changes getTarVersion() so that it receives the name of the
tar program from the caller instead of using the hardcoded string "tar".
@igfoo igfoo marked this pull request as ready for review February 17, 2025 12:19
@igfoo igfoo requested a review from a team as a code owner February 17, 2025 12:19
@igfoo igfoo enabled auto-merge February 17, 2025 12:20
@igfoo igfoo merged commit 8c1551c into main Feb 17, 2025
527 checks passed
@igfoo igfoo deleted the cklin/prefer-gtar branch February 17, 2025 12:31
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.

3 participants