Dylan Conway
c19dcb3181
fix(shell): reject non-finite seq args and handle empty condexpr args (#26993)
## Summary
- **`seq inf` / `seq nan` / `seq -inf` hang**: `std.fmt.parseFloat`
accepts non-finite float values like `inf`, `nan`, `-inf`, but the loop
`while (current <= this._end)` never terminates when `_end` is infinity.
Now rejects non-finite values after parsing.
- **`[[ -d "" ]]` out-of-bounds panic**: Empty string expansion produces
no args in the args list, but `doStat()` unconditionally accesses
`args.items[0]`. Now checks `args.items.len == 0` before calling
`doStat()` and returns exit code 1 (path doesn't exist).
## Test plan
- [x] `seq inf`, `seq nan`, `seq -inf` return exit code 1 with "invalid
argument" instead of hanging
- [x] `[[ -d "" ]]` and `[[ -f "" ]]` return exit code 1 instead of
panicking
- [x] `seq 3` still works normally (produces 1, 2, 3)
- [x] `[[ -d /tmp ]]`, `[[ -f /etc/hostname ]]` still work correctly
- [x] Tests pass with `bun bd test`, seq tests fail with
`USE_SYSTEM_BUN=1`
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 18:01:40 -08:00
..
2025-09-20 00:35:42 -07:00
2025-08-23 06:55:30 -07:00
2025-07-14 00:47:53 -07:00
2025-10-23 13:14:36 -07:00
2025-09-04 14:59:35 -07:00
2026-01-23 00:23:25 -08:00
2025-06-05 20:20:00 -07:00
2025-09-25 16:24:24 -07:00
2026-01-18 13:31:21 -08:00
2026-01-09 00:33:35 -08:00
2025-11-23 01:41:17 -08:00
2026-01-30 16:20:45 -08:00
2025-10-05 17:23:59 -07:00
2026-02-12 00:28:44 -08:00
2025-11-05 15:28:28 -08:00
2026-01-16 10:12:28 -08:00
2026-01-26 00:21:34 -08:00
2026-01-26 10:52:35 -08:00
2026-01-16 16:23:01 -08:00
2026-01-23 00:23:25 -08:00
2026-01-28 20:24:02 -08:00
2026-02-09 00:52:17 -08:00
2025-03-14 22:13:31 -07:00
2026-02-06 18:05:17 -08:00
2025-05-26 21:18:22 -07:00
2025-11-23 01:41:42 -08:00
2026-01-26 10:52:35 -08:00
2026-01-21 13:01:25 -08:00
2026-02-13 18:01:40 -08:00
2025-12-26 23:39:37 -08:00
2025-09-24 00:47:52 -07:00
2025-07-14 00:47:53 -07:00
2025-12-15 12:51:13 -08:00
2026-02-02 17:39:36 -08:00
2026-01-21 13:39:25 -08:00
2026-01-30 01:38:45 -08:00
2025-05-08 23:22:16 -07:00
2026-02-05 17:31:15 -08:00
2025-01-17 22:08:07 -08:00
2025-11-01 22:43:21 -07:00
2026-01-26 10:52:35 -08:00
2026-01-09 00:33:35 -08:00
2026-02-11 22:47:41 -08:00
2025-03-11 18:21:20 -07:00
2025-08-19 16:40:48 -07:00
2025-05-19 17:05:10 -07:00
2025-08-23 06:57:00 -07:00
2025-08-23 06:57:00 -07:00
2025-08-23 06:57:00 -07:00
2025-09-25 19:03:22 -07:00