* 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)
| 85 | * ripgrep tries to spawn too many threads. |
| 86 | */ |
| 87 | function isEagainError(stderr: string): boolean { |
| 88 | return ( |
| 89 | stderr.includes('os error 11') || |
| 90 | stderr.includes('Resource temporarily unavailable') |
| 91 | ) |
| 92 | } |
| 93 | |
| 94 | /** |
| 95 | * Custom error class for ripgrep timeouts. |