🐛 Bypass MSYS2 bash in Windows pnatar wrapper to fix @-file expansion#2864
Conversation
The MSYS2 runtime expands unquoted @-prefixed arguments as response files during process startup (dcrt0.cc::build_argv). This caused @archive arguments like @noclamp.tar to be replaced with the binary file contents before pna.exe could process them, breaking archive-to-archive copy on Windows. Invoke pna.exe directly from the .cmd wrapper instead of going through MSYS2 bash, eliminating the @-file expansion entirely.
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe bsdtar-compat GitHub Actions workflow was changed to stop using the repository bash wrapper and instead directly write a Windows Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/bsdtar-compat.yml:
- Line 330: The generated Windows wrapper currently writes a line that calls
PNA_WIN (which points to the wrapper itself) causing self-recursion; change the
printf so the wrapper invokes the actual pna executable instead of PNA_WIN —
e.g. use the real Windows executable variable (referenced as PNA_EXE or compute
from PNATAR_BIN by replacing the .cmd name with .exe) in the printf call that
writes to PNATAR_BIN so the wrapper runs pna.exe with the same arguments and
flags rather than re-invoking the .cmd.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 5ac631f0-6502-4842-ac18-9df386ffdab9
📒 Files selected for processing (1)
.github/workflows/bsdtar-compat.yml
The previous commit bypassed MSYS2 bash, making the wrapper script unreferenced. Remove the script and its path trigger entries from the workflow.
The MSYS2 runtime expands unquoted @-prefixed arguments as response files during process startup (dcrt0.cc::build_argv). This caused @archive arguments like @noclamp.tar to be replaced with the binary file contents before pna.exe could process them, breaking archive-to-archive copy on Windows.
Invoke pna.exe directly from the .cmd wrapper instead of going through MSYS2 bash, eliminating the @-file expansion entirely.
Summary by CodeRabbit