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

Pass --ignore-zeros to tar when decompressing zstd-compressed tarballs #2768

Merged
merged 2 commits into from
Feb 18, 2025

Conversation

smowton
Copy link
Contributor

@smowton smowton commented Feb 17, 2025

See comment in the diff for full explanation.

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.

…arballs

See comment in the diff for full explanation.
@Copilot Copilot bot review requested due to automatic review settings February 17, 2025 17:04
@smowton smowton requested a review from a team as a code owner February 17, 2025 17:04

Choose a reason for hiding this comment

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

PR Overview

This PR updates the tar extraction command for zstd-compressed tarballs by adding the "--ignore-zeros" flag to address potential issues when the archive contains trailing zero bytes.

  • Updated the argument array in the extractTarZst function to include "--ignore-zeros".
  • Added detailed comments explaining the need for the additional flag and linking to a relevant issue for context.

Changes

File Description
src/tar.ts Updated the tar extraction command to safely handle trailing zeroes by passing --ignore-zeros.

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Tip: If you use Visual Studio Code, you can request a review from Copilot before you push from the "Source Control" tab. Learn more

@henrymercer henrymercer added the Rebuild Re-transpile JS & re-generate workflows label Feb 17, 2025
@github-actions github-actions bot removed the Rebuild Re-transpile JS & re-generate workflows label Feb 17, 2025
Copy link
Contributor

Pushed a commit to rebuild the Action. Please mark the PR as ready for review to trigger PR checks.

@github-actions github-actions bot marked this pull request as draft February 17, 2025 17:21
@henrymercer henrymercer marked this pull request as ready for review February 17, 2025 17:22
Copy link
Contributor

@henrymercer henrymercer left a comment

Choose a reason for hiding this comment

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

Thanks for the thorough investigation and explanation! This looks good to me assuming checks pass.

Do you have an opinion about whether this means we should revert #2767 and return to preferring bsdtar on macOS systems? If we revert that PR, we should add a changenote to this one.

@smowton
Copy link
Contributor Author

smowton commented Feb 17, 2025

No strong opinion -- using gtar is also fine. This should probably be done anyhow since it means we'll work better with BSD tar whenever it's the only one around.

@henrymercer henrymercer merged commit 1bb15d0 into main Feb 18, 2025
262 checks passed
@henrymercer henrymercer deleted the smowton/fix/zstd-tarball-trailing-zeros branch February 18, 2025 10:42
henrymercer added a commit that referenced this pull request Feb 18, 2025
@github-actions github-actions bot mentioned this pull request Feb 21, 2025
8 tasks
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