Skip to content

Conversation

@LorbusChris
Copy link

The @vscode/ripgrep package postinstall script expects specific binary variants for each architecture. This patch:

  1. Fixes aarch64 to use musl variant instead of gnu

    • Both variants exist, but postinstall expects musl
    • Aligns with x86_64 and i386 (which also use musl)
  2. Adds missing architecture mappings for ppc64, riscv64, and s390x

    • These architectures are supported by @vscode/ripgrep
    • Uses gnu variants (only available option for these arches)

Current code causes the postinstall script to fail to find the cached binary on aarch64 and attempt to download from GitHub, which fails in offline build environments (RPM builds, air-gapped systems, etc).

The mappings now match exactly what the postinstall script expects: https://github.com/microsoft/vscode-ripgrep/blob/main/lib/postinstall.js#L38-L47

Assisted-by: Claude Code

@LorbusChris LorbusChris requested a review from a team as a code owner December 29, 2025 13:09
@github-actions github-actions bot added the node label Dec 29, 2025
…ures

The @vscode/ripgrep package postinstall script expects specific binary
variants for each architecture. This patch:

1. Adds backwards compatibility for aarch64 libc variants
   - Versions < 1.13.0 used gnu variant (aarch64-unknown-linux-gnu)
   - Versions >= 1.13.0 switched to musl (aarch64-unknown-linux-musl)
   - Both variants exist in different ripgrep-prebuilt releases

2. Adds missing architecture mappings for ppc64, riscv64, and s390x
   - These architectures are supported by @vscode/ripgrep
   - Uses gnu variants (only available option for these arches)

This prevents the postinstall script from failing to find the cached
binary and attempting to download from GitHub, which fails in offline
build environments (RPM builds, air-gapped systems, etc).

The mappings now match what the postinstall script expects based on
the package version being used.

See: https://github.com/microsoft/vscode-ripgrep/blob/main/lib/postinstall.js

Assisted-by: Claude Code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants