mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
## Summary - When running `bun <file>` on a file with an unsupported type (e.g., `.css`, `.yaml`, `.toml`), Bun now shows a helpful error message instead of the misleading "File not found" - Tracks when a file is resolved but has a loader that can't be run directly - Shows the actual file path and file type in the error message **Before:** ``` error: File not found "test.css" ``` **After:** ``` error: Cannot run "/path/to/test.css" note: Bun cannot run css files directly ``` ## Test plan - [x] Added regression test in `test/regression/issue/1365.test.ts` - [x] Test verifies unsupported files show "Cannot run" error - [x] Test verifies nonexistent files still show "File not found" - [x] Test fails with `USE_SYSTEM_BUN=1` and passes with debug build Fixes #1365 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Bot <claude-bot@bun.sh> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>