Repository navigation
fix(npm): use Windows system tar for extraction - #53
Merged
Merged
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
%SystemRoot%\System32\tar.exeinstead of relying onPATHordering.SystemRootor the Windows system tar is unavailable; do not fall back to an arbitrary PATH executable on Windows.tarbehavior and the existing argument-array invocation.make test.Why
When Git for Windows GNU tar is first on
PATH, it can interpret the colon in an absolute drive-letter archive path as remote-archive syntax. The npm installer then fails after download and checksum verification, even though the same archive extracts successfully with the Windows system bsdtar.Selecting
%SystemRoot%\System32\tar.exeavoids dependence on PATH ordering while retaining the existing SHA-256 verification before extraction. No dependencies are added.Fixes #41
Reproduction and verification
Validated implementation:
e687910d5045e88a98079ad2bfb2062d2eb03705, based on8ab057d4dd479277789b989821ebd3425dead9e7.PATH: exit 1 withCannot connect to C: resolve failed.%SystemRoot%\System32\tar.exe: extraction succeeds and fixture contents match.café, hostile PATH tar, real Git GNU tar precedence, missing/invalid extractor, extraction failure, and checksum mismatch.sh scripts/test-installer-strict.sh: passed under bothshandbash.python3 -m unittest discover -s tests -p test_installer.py: 16/16 passed.node --check npm/install.jsandnode --check npm/install.test.js: passed.git diff --check: passed.The complete repository test suite is not claimed as passing.
make testreaches inherited Rust compilation failures for missingcommands::doctor::share_report, adoctor::runargument mismatch, and a non-exhaustive telemetry match. The same failures were reproduced at the unchanged baseline; this PR changes no Rust files.Known limitations