Commit 7718bef
committed
fix: separate countFileLines and isBinaryFile calls for accurate error handling
- Split Promise.all() into sequential calls to isolate error sources
- countFileLines is called first and should not fail for valid files
- Only isBinaryFile errors are caught and handled by treating file as binary
- This ensures RangeError from isBinaryFile doesn't incorrectly attribute to countFileLines
- Fixes issue where binary file detection errors were masking actual file reading problems1 parent 6796e1a commit 7718bef
1 file changed
+5
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
436 | 436 | | |
437 | 437 | | |
438 | 438 | | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
439 | 443 | | |
440 | | - | |
441 | | - | |
442 | | - | |
| 444 | + | |
443 | 445 | | |
444 | 446 | | |
445 | 447 | | |
446 | | - | |
447 | 448 | | |
448 | 449 | | |
449 | 450 | | |
| |||
0 commit comments