robobun
bcbb4fc35d
fix(cli): show helpful error for unsupported file types instead of "File not found" ( #26126 )
...
## 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 >
2026-01-15 23:40:45 -08:00
..
2026-01-08 01:06:03 -08:00
2025-09-24 02:42:57 -07:00
2025-11-10 16:30:47 -08:00
2025-11-07 20:58:44 -08:00
2025-11-03 20:36:22 -08:00
2025-08-12 17:07:46 -07:00
2025-10-07 08:17:13 -07:00
2025-11-03 22:20:07 -08:00
2025-08-14 16:36:44 -07:00
2025-12-19 23:17:51 -08:00
2025-09-22 05:30:34 -07:00
2025-11-03 22:20:07 -08:00
2025-12-11 17:44:41 -08:00
2025-11-03 20:36:22 -08:00
2025-11-03 22:20:07 -08:00
2025-11-07 05:28:33 -08:00
2025-09-25 19:03:22 -07:00
2025-11-03 22:20:07 -08:00
2025-11-03 22:20:07 -08:00
2025-10-08 18:00:38 -07:00
2026-01-08 01:06:03 -08:00
2025-11-03 22:20:07 -08:00
2025-09-27 00:45:29 -07:00
2025-09-27 00:45:29 -07:00
2025-10-19 23:28:59 -07:00
2025-11-03 22:20:07 -08:00
2025-07-15 22:14:00 -07:00
2025-09-09 21:42:01 -07:00
2025-07-07 11:21:36 -07:00
2025-09-22 05:30:34 -07:00
2025-10-29 21:05:25 -07:00
2025-09-30 13:25:50 -07:00
2025-07-14 00:47:53 -07:00
2025-09-26 15:23:32 -07:00
2025-10-08 12:13:06 -07:00
2025-08-27 06:39:11 -07:00
2026-01-15 23:40:45 -08:00
2025-12-19 05:21:44 +00:00
2025-09-09 21:42:01 -07:00
2025-09-09 21:42:01 -07:00
2025-11-21 18:31:45 -08:00
2025-09-09 21:42:01 -07:00
2025-10-08 18:00:38 -07:00
2025-09-09 21:42:01 -07:00
2025-09-09 21:42:01 -07:00
2025-11-03 22:20:07 -08:00
2026-01-07 23:39:10 -08:00
2025-11-03 22:20:07 -08:00
2025-01-20 23:17:52 -08:00
2025-12-15 18:37:09 -08:00
2025-11-03 22:20:07 -08:00
2025-11-03 22:20:07 -08:00
2025-09-22 03:27:09 -07:00
2025-09-22 03:27:09 -07:00
2025-09-22 03:27:09 -07:00
2025-09-22 03:27:09 -07:00
2025-09-22 03:27:09 -07:00
2025-09-22 03:27:09 -07:00
2025-09-22 03:27:09 -07:00
2025-09-22 03:27:09 -07:00
2025-09-22 03:27:09 -07:00
2025-09-22 03:27:09 -07:00
2025-09-22 03:27:09 -07:00
2025-09-22 03:27:09 -07:00
2025-09-22 03:27:09 -07:00
2025-09-22 03:27:09 -07:00
2025-09-22 03:27:09 -07:00
2025-09-22 03:27:09 -07:00
2025-09-22 03:27:09 -07:00
2025-09-22 03:27:09 -07:00
2025-09-22 03:27:09 -07:00
2025-09-22 03:27:09 -07:00
2025-09-22 03:27:09 -07:00
2025-09-22 03:27:09 -07:00
2025-09-22 03:27:09 -07:00
2025-09-22 03:27:09 -07:00
2025-09-22 03:27:09 -07:00
2025-09-22 03:27:09 -07:00
2025-09-22 03:27:09 -07:00
2025-09-22 03:27:09 -07:00
2025-09-22 03:27:09 -07:00
2025-09-22 03:27:09 -07:00
2025-09-22 03:27:09 -07:00
2025-09-22 03:27:09 -07:00
2025-09-22 03:27:09 -07:00
2025-09-22 03:27:09 -07:00
2025-09-22 03:27:09 -07:00
2025-09-22 03:27:09 -07:00
2025-09-22 03:27:09 -07:00
2025-08-21 14:53:50 -07:00
2026-01-08 01:06:03 -08:00
2025-09-09 21:42:01 -07:00
2025-11-14 16:49:21 -08:00
2025-09-09 21:42:01 -07:00
2025-09-09 21:42:01 -07:00
2025-11-03 22:20:07 -08:00
2025-09-09 21:42:01 -07:00
2025-10-08 18:00:38 -07:00
2025-11-01 22:38:36 -07:00
2025-11-22 15:08:12 -08:00
2025-01-03 08:21:00 -08:00
2025-08-21 14:53:50 -07:00
2025-11-03 20:36:22 -08:00
2025-08-12 17:07:46 -07:00
2025-10-20 16:32:04 -07:00
2025-11-03 22:20:07 -08:00
2025-11-03 22:20:07 -08:00
2025-11-07 05:28:33 -08:00
2025-08-12 17:07:46 -07:00
2025-10-08 01:51:25 -07:00
2025-09-09 21:42:01 -07:00
2026-01-09 16:56:31 -08:00
2025-07-16 01:01:10 -07:00
2025-09-09 21:42:01 -07:00
2025-09-09 21:42:01 -07:00
2025-09-09 21:42:01 -07:00