`rs` command collides with the pre-installed BSD rs (reshape) utility on macOS/BSD, causing a silent, CPU-idle hang
Les mainteneurs répondent en général sous 1 jour
@chenjiahan y travaille déjà.
Depuis le 24/9/2026.
Évaluation
Cette issue n'a pas encore été évaluée.
Description
Environment
- rstack: 0.8.0
- Node.js: v24.21.0
- pnpm: 12.6.0
- OS: macOS 27
- Package manager mode: pnpm strict node_modules
Summary
On macOS and other BSD-derived operating systems (FreeBSD, NetBSD, OpenBSD), /usr/bin/rs is a standard pre-installed utility (BSD rs — "reshape a data array", part of the base system since 4.2BSD). When Rstack CLI's rs binary is not resolved first on $PATH (e.g. when typed directly in an interactive shell rather than invoked through a package.json script), the shell falls back to the OS-native /usr/bin/rs instead of node_modules/.bin/rs.
Steps to reproduce
- In a project using
[email protected], open a plain shell (not throughpnpm run <script>) and run:
rs check
- The command hangs indefinitely with no output.
Ctrl+Cexits with no error message.- Running
npx rs check(which forces resolution to the localnode_modules/.bin/rs) works correctly and completes.
Root cause
BSD's rs utility reads from standard input by default and blocks waiting for piped input when invoked with no valid input stream — this matches the observed symptoms exactly:
- Near-zero CPU usage during the hang (blocked on a
read()call, not computing) - No output before or after interruption
- Resolved entirely by forcing local binary resolution via
npx/pnpm exec
Impact
This affects any BSD-derived OS (macOS included) where /usr/bin/rs precedes the project's node_modules/.bin in $PATH — which is the default shell behavior outside of npm/pnpm script execution contexts. Linux (GNU coreutils-based) is unaffected, as it has no native rs command.
Suggested fix
Since renaming the rs binary would be a breaking change, consider:
- Documenting the
$PATHcollision explicitly in the README, alongside a recommendation to invoke viapnpm exec rs/npx rsrather than a barersin interactive shells - Optionally detecting this collision at runtime (e.g., checking
which rsresolves to the expected package path) and warning the user
Related
This was discovered while investigating what first appeared to be an unrelated hang in rs check --type-check; see #519 for the original (now corrected) report.
- Langage dominant
- TypeScript
- Étoiles
- 28
- Forks
- 1
- Merge moyen
- 6 h 1 min
- PR mergées (30 j)
- 101
Préparer son environnement
Nous n'avons pas encore vérifié les fichiers d'installation de ce projet. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de rstackjs/rstack-cli
-
`rstack/types/index.d.ts` references `@rsbuild/core/types` which cannot be resolved under pnpmPeut-être pris @chenjiahan l’a pris il y a 1 jour. Ouverte
rstackjs/rstack-cli#519 · 1 commentaire · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
Rstack CLI RoadmapOuverte
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 20/100
rstackjs/rstack-cli#44 ·
Les mainteneurs répondent en général sous 1 jour
-
Dependency DashboardOuverte
Difficulté 4/5 3-5 jours Accessibilité débutants 25/100
rstackjs/rstack-cli#37 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de rstackjs/rstack-cli
Issues similaires
-
ADD openalgoOuvertetemplate
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
Les mainteneurs répondent en général sous 1 jour
-
factory-active factory-automatic task-bug-reproduction-success task-identify-harness-labels-done task-identify-issue-type-done
Difficulté 2/5 1-3 heures Accessibilité débutants 90/100
vercel/ai#21528 · 3 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
bug Needs: Triage :mag:
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
microsoft/fluentui-contrib#671 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
sveltejs/acorn-typescript#150 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100