* Check if an error is EAGAIN (resource temporarily unavailable). * This happens in resource-constrained environments (Docker, CI) when * ripgrep tries to spawn too many threads.
(stderr: string)
| 77 | * ripgrep tries to spawn too many threads. |
| 78 | */ |
| 79 | function isEagainError(stderr: string): boolean { |
| 80 | return ( |
| 81 | stderr.includes('os error 11') || |
| 82 | stderr.includes('Resource temporarily unavailable') |
| 83 | ) |
| 84 | } |
| 85 | |
| 86 | /** |
| 87 | * Custom error class for ripgrep timeouts. |