#5688: fix: recognize versioned node binaries like node24 (openSUSE)
gateway
cli
Cluster:
Node and macOS Enhancements
## Summary
Fixes #5691
- Fixes runtime detection for versioned Node binaries like `node24` (openSUSE) and `node-22`
- On openSUSE, Node.js is installed as `/usr/bin/node24` (no hyphen), which wasn't recognized
- This caused gateway service generation and CLI argument parsing to fail
## Changes
- Create shared `src/daemon/runtime-detect.ts` module with `isNodeRuntime()` and `isBunRuntime()`
- Fix regex pattern: `/^node-\d+/` → `/^node-?\d+/` (make hyphen optional)
- Remove duplicate implementations from `program-args.ts` and `service-audit.ts`
- Fix same pattern in `src/cli/argv.ts` for CLI argument parsing
- Add comprehensive tests (11 test cases)
## Test plan
- [x] Tested on openSUSE server with `/usr/bin/node24`
- [x] Gateway service runs without workarounds
- [x] All existing tests pass
- [x] `pnpm format && pnpm lint && pnpm build && pnpm test` passes
🤖 Generated with [Claude Code](https://claude.ai/code)
Most Similar PRs
#22700: fix: support node binaries named like `node22`
by lictex · 2026-02-21
74.4%
#22341: fix(status): detect node-only mode and show remote gateway info
by therk · 2026-02-21
70.0%
#6064: fix(daemon): prefer bundled node from install-cli.sh over system node
by joyshmitz · 2026-02-01
68.7%
#18112: fix(daemon): gateway install on macOS ignores fnm/nvm node (#18090)
by yinghaosang · 2026-02-16
68.4%
#23113: fix: show actual runtime version after update/restart when service ...
by BryanTegomoh · 2026-02-22
65.3%
#20584: fix: use stable Homebrew symlink for daemon node path
by mwfj · 2026-02-19
64.9%
#11470: fix: prevent gateway:watch race by passing --no-clean to tsdown
by apetresc · 2026-02-07
62.7%
#15475: fix(update): Handle Homebrew+Node Cellar path mismatch
by brandonwise · 2026-02-13
62.3%
#12039: TTS voice bubbles, node role auth, media fixes, CI lint cleanup
by dmiv · 2026-02-08
62.2%
#6865: fix: handle extended "fetch failed" messages in Node v25+
by hclsys · 2026-02-02
62.2%