mirror of
https://github.com/oven-sh/bun
synced 2026-02-15 21:32:05 +00:00
This fixes GitHub issue #21697 where scripts couldn't detect if they were running under Bun shell by checking the SHELL environment variable. Changes: - Set SHELL to Bun executable path in shell interpreter initialization - Handle both standalone shell scripts and Bun.$ API calls - Add comprehensive tests for SHELL environment variable behavior - Works on both Windows and Unix platforms The SHELL variable now correctly points to the Bun executable, allowing scripts to detect when they're running under Bun shell vs other shells. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>