-
Notifications
You must be signed in to change notification settings - Fork 0
fix: --version issues (#22) #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Adding CLAUDE.md with task information for AI processing. This file will be removed when the task is complete. Issue: #22
- Remove npm installation option from README.md - Update examples to use bun commands instead of npm - Change package.json engines from node to bun - Update REQUIREMENTS.md to remove Node.js alternative - Update case study with implementation status - Fix CLAUDE.md formatting Fixes #22 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
|
I see no actual code changes in this Pull Request, also we may need additional tests, logging in |
|
🤖 AI Work Session Started Starting automated work session at 2025-12-23T19:36:26.825Z The PR has been converted to draft mode while work is in progress. This comment marks the beginning of an AI work session. Please wait working session to finish, and provide your feedback. |
The macOS bundled version of GNU Screen (4.00.03) has a known bug where `screen --version` returns a non-zero exit code even when successful. This bug was fixed in GNU Screen v4.8.0. Changes: - Use spawnSync instead of execSync to capture output regardless of exit code - Add --verbose flag support for debugging version detection - Use -v flag for screen (more universally supported) - Add 3 new tests for verbose mode Root cause: execSync throws on non-zero exit code, causing catch block to return null even when version output was successfully captured. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
🤖 AI Work Session CompletedSummary of ChangesThis session addressed the remaining issue from #22 - screen version detection on macOS. Root Cause FoundThe macOS bundled version of GNU Screen (4.00.03) has a known bug where The previous fix used Solution Implemented
Test Results
Files Changed
The PR is now ready for review. AI work session completed at 2025-12-23T19:46:00Z |
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
Summary
This PR fixes the
--versionissues reported in #22, specifically addressing the screen version detection bug on macOS.Root Cause Analysis
The macOS bundled version of GNU Screen (4.00.03) has a known bug where
screen --versionreturns a non-zero exit code even when successful. This bug was fixed in GNU Screen v4.8.0. Reference: GNU Screen v.4.8.0 Release NotesThe previous fix used
execSync()with2>&1, butexecSync()throws an exception when the command returns non-zero exit code, so the output was never captured.Fixes in This PR
spawnSyncinstead ofexecSyncto capture output regardless of exit code--verboseflag support - Added$ --version --verbosefor debugging version detection-vflag for screen - More universally supported than--versionPrevious Fixes (already in main via PR #23)
Bun.versionsw_vers -productVersionon darwin$ --version --error - Fixed by allowing trailing--with version flagChanges
Code Changes
src/bin/cli.js:spawnSyncimportgetToolVersion()to usespawnSyncfor exit-code-independent output captureprintVersion()andgetToolVersion()--versionto-vTest Changes
test/version.test.js: Added 3 new tests for verbose modeDocumentation
docs/case-studies/issue-22/analysis.md: Updated with root cause analysis and solutionTest Plan
$ --versionshows correct versions$ --version --verboseshows debugging info$ --version --works correctlyVerified Behavior
Fixes #22
🤖 Generated with Claude Code