mirror of
https://github.com/oven-sh/bun
synced 2026-02-13 12:29:07 +00:00
The previous fix only handled direct Cmd children, missing exit commands in nested constructs like Binary operators (&&, ||), If statements, Pipelines, etc. This commit introduces a more robust solution: - Added exit_requested flag to Stmt and Binary states - Added childDoneWithExit() methods to propagate exit requests - Binary now properly detects and propagates exit from any child - Exit now works correctly in && and || chains - Added comprehensive tests for chained and nested exit commands The fix ensures that exit stops execution immediately regardless of nesting level or operator context. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>