Title: `rs` command collides with the pre-installed BSD rs (reshape) utility on macOS/BSD, causing a silent, CPU-idle hang · Issue #518 · rstackjs/rstack-cli · GitHub
Open Graph Title: `rs` command collides with the pre-installed BSD rs (reshape) utility on macOS/BSD, causing a silent, CPU-idle hang · Issue #518 · rstackjs/rstack-cli
X Title: `rs` command collides with the pre-installed BSD rs (reshape) utility on macOS/BSD, causing a silent, CPU-idle hang · Issue #518 · rstackjs/rstack-cli
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-insta...
Open Graph 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, OpenB...
X 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, OpenB...
Opengraph URL: https://github.com/rstackjs/rstack-cli/issues/518
X: @github
Domain: redirect.github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`rs` command collides with the pre-installed BSD rs (reshape) utility on macOS/BSD, causing a silent, CPU-idle hang","articleBody":"## Environment\n\n- rstack: 0.8.0\n- Node.js: v24.21.0\n- pnpm: 12.6.0\n- OS: macOS 27\n- Package manager mode: pnpm strict node_modules\n\n## Summary\nOn 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`.\n\n## Steps to reproduce\n1. In a project using `rstack@0.8.0`, open a plain shell (not through `pnpm run \u003cscript>`) and run:\n```shell\nrs check\n```\n2. The command hangs indefinitely with no output.\n3. `Ctrl+C` exits with no error message.\n4. Running `npx rs check` (which forces resolution to the local `node_modules/.bin/rs`) works correctly and completes.\n\n## Root cause\nBSD'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:\n- Near-zero CPU usage during the hang (blocked on a `read()` call, not computing)\n- No output before or after interruption\n- Resolved entirely by forcing local binary resolution via `npx`/`pnpm exec`\n\n## Impact\nThis 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.\n\n## Suggested fix\nSince renaming the `rs` binary would be a breaking change, consider:\n- Documenting the `$PATH` collision explicitly in the README, alongside a recommendation to invoke via `pnpm exec rs` / `npx rs` rather than a bare `rs` in interactive shells\n- Optionally detecting this collision at runtime (e.g., checking `which rs` resolves to the expected package path) and warning the user\n\n## Related\nThis 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.","author":{"url":"https://github.com/logue","@type":"Person","name":"logue"},"datePublished":"2026-09-24T09:52:38Z","url":"https://github.com/rstackjs/rstack-cli/issues/518"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c9daffd8-08f3-3bf8-bd4c-914b619214c4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D962:10DE21:10C220:172F34:6AEC85E3 |
| html-safe-nonce | 7298896b26c7db8af09b186e8b950d07e1785a9ea7d63076715e6efdb1d46343 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOTYyOjEwREUyMToxMEMyMjA6MTcyRjM0OjZBRUM4NUUzIiwidmlzaXRvcl9pZCI6IjI2OTg1MjEzNzgyNzU3NTU0OTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 9729f60e4266ac8f68851a27d0f4629a489b797aa88f3e8c093e07705dc6988e |
| hovercard-subject-tag | issue:5566504700 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/rstackjs/rstack-cli/518/issue_layout |
| twitter:image | https://opengraph.githubassets.com/729c8e96760765750deb92f87309767083fe8add5d4c260dd10ddb38d72c2e17/rstackjs/rstack-cli/issues/518 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/729c8e96760765750deb92f87309767083fe8add5d4c260dd10ddb38d72c2e17/rstackjs/rstack-cli/issues/518 |
| og:image:alt | 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, OpenB... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | logue |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9e71b15756bc4afd8519e1d2c309d0293587d17d6675d0f439cc304af9ed67ee |
| turbo-cache-control | no-preview |
| go-import | github.com/rstackjs/rstack-cli git https://github.com/rstackjs/rstack-cli.git |
| octolytics-dimension-user_id | 129049372 |
| octolytics-dimension-user_login | rstackjs |
| octolytics-dimension-repository_id | 1138027854 |
| octolytics-dimension-repository_nwo | rstackjs/rstack-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1138027854 |
| octolytics-dimension-repository_network_root_nwo | rstackjs/rstack-cli |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9c2272d26b06ef11573649367fbbb67bfa00cd4f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width