-
Notifications
You must be signed in to change notification settings - Fork 90
fix(mux): fix sed pattern escaping for npm tarball fallback #628
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes sed pattern escaping issues in the mux module's npm tarball fallback logic. When npm is unavailable, the script uses sed to parse JSON responses from the npm registry, but incorrect quote escaping (\"...\\(...\\)\") was causing the patterns to fail, resulting in 404 errors for version lookups.
Key changes:
- Fixed sed pattern escaping from
\"...\\(...\\)\"to"...\(...\)"in tarball URL extraction - Fixed sed pattern escaping in version resolution and binary path extraction
- Changed escape sequences from double-backslash to single-backslash for sed capture groups
When npm is not available, the mux module falls back to downloading the tarball directly from the npm registry. The sed patterns used to extract tarball URL, version, and bin path were double-escaping quotes, causing them to fail silently. This resulted in: - install_version="latest" or "next" failing with 404 errors - Binary path extraction failing with chmod errors Fixes the escaping from \"...\\(...\\)\" to "...\(...\)"
6d3ecbe to
af5c4c3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
|
@codex review |
|
To use Codex here, create a Codex account and connect to github. |
|
@03kalven thanks for catching this, this would require a version bump in mux README you can invoke |
ibetitsmike
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needed version bump
Description
When npm is not available, the mux module's sed-based fallback for extracting tarball URL, version, and bin path fails due to double-escaped quotes. This causes
install_version="latest"or"next"to 404.Fixes the escaping from
\"...\\(...\\)\"to"...\(...\)"Type of Change
Module Information
Path:
registry/coder/modules/muxNew version: N/A (patch fix)
Breaking change: [x] No
Testing & Validation
bun test)bun fmt)Related Issues
None