You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fbddfb0
Browse filesBrowse the repository at this point in the historyBrowse files
fix(filesystem): return no lines for read_text_file head/tail 0
read_text_file tested head and tail for truthiness, so a count of 0 fell
through to reading the whole file, and head: 0 with tail: 0 was not
rejected. Compare against undefined instead, make tailFile return empty
text for 0 lines (slice(-0) returned every line), and accept only
non-negative integers for both counts.
Closes#5184
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: cliffhall <[email protected]>
`read_text_file` (and the deprecated `read_file`) now treats `head: 0` or `tail: 0` as a request for zero lines and returns empty text, instead of the whole file. `head` and `tail` accept only non-negative integers, and `head` with `tail` is rejected even when either is 0.
0 commit comments