← Back to PRs

#5688: fix: recognize versioned node binaries like node24 (openSUSE)

by an4tman open 2026-01-31 21:00 View on GitHub →
gateway cli
## 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