Skip to content

Conversation

@03kalven
Copy link
Contributor

@03kalven 03kalven commented Jan 1, 2026

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

  • New module
  • New template
  • Bug fix
  • Feature/enhancement
  • Documentation
  • Other

Module Information

Path: registry/coder/modules/mux
New version: N/A (patch fix)
Breaking change: [x] No

Testing & Validation

  • Tests pass (bun test)
  • Code formatted (bun fmt)
  • Changes tested locally

Related Issues

None

@matifali matifali added the version:patch Add to PRs requiring a patch version upgrade label Jan 1, 2026
@matifali matifali requested a review from Copilot January 1, 2026 08:09
Copy link
Contributor

Copilot AI left a 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 "...\(...\)"
Copy link
Contributor

Copilot AI left a 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.

@matifali matifali requested a review from ibetitsmike January 2, 2026 12:15
@ibetitsmike
Copy link
Contributor

@codex review

@chatgpt-codex-connector
Copy link

To use Codex here, create a Codex account and connect to github.

@ibetitsmike ibetitsmike self-requested a review January 2, 2026 15:35
@ibetitsmike
Copy link
Contributor

@03kalven thanks for catching this, this would require a version bump in mux README

you can invoke ./.github/scripts/version-bump.sh patch
in your branch - it should show you a bump on mux to 1.0.6

Copy link
Contributor

@ibetitsmike ibetitsmike left a comment

Choose a reason for hiding this comment

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

needed version bump

@ibetitsmike ibetitsmike enabled auto-merge (squash) January 2, 2026 22:17
@ibetitsmike ibetitsmike merged commit bb222f3 into coder:main Jan 2, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

version:patch Add to PRs requiring a patch version upgrade

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants