- Add detectBashVariant() that checks $OSTYPE for reliable WSL/MSYS/Cygwin
detection instead of relying solely on executable path
- Add input validation to convertPathForBash() to catch null/undefined args
- Add validate_port() function in bash script to reject invalid port input
(non-numeric, out of range) with clear error messages
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add convertPathForBash() function that detects bash variant:
- Cygwin: /cygdrive/c/path
- WSL: /mnt/c/path
- MSYS/Git Bash: /c/path
- Update exit handler to properly handle signal termination
(exit code 1 when killed by signal vs code from child)
Addresses remaining CodeRabbit PR #586 recommendations.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove duplicate killPtyProcess method in claude-usage-service.ts
- Import and use spawnSync correctly instead of spawn.sync
- Fix misleading comment about shell option and signal handling
The `./start-automaker.sh` script doesn't work when invoked from Windows
CMD or PowerShell because:
1. The `./` prefix is Unix-style path notation
2. Windows shells don't execute .sh files directly
This adds a Node.js launcher (`start-automaker.mjs`) that:
- Detects the platform and finds bash (Git Bash, MSYS2, Cygwin, or WSL)
- Converts Windows paths to Unix-style for bash compatibility
- Passes all arguments through to the original bash script
- Provides helpful error messages if bash isn't found
The npm scripts now use `node start-automaker.mjs` which works on all
platforms while preserving the full functionality of the bash TUI launcher.