Function: resolveMaxDepthArgv()
ts
function resolveMaxDepthArgv(maxDepth: number | undefined): readonly string[];Defined in: src/batteries/sandbox/node/search_ripgrep.ts:96
Emit --max-depth N only when a depth was EXPLICITLY requested.
Parameters
| Parameter | Type | Description |
|---|---|---|
maxDepth | number | undefined | The requested depth, or undefined for unbounded. |
Returns
readonly string[]
The flag pair, or an empty array when unbounded.
Remarks
Issue #48: the adapter emitted this flag unconditionally, so omitting maxDepth produced the literal argv --max-depth undefined, rg exited 2, and every omitted-depth search failed. Omission now means unbounded — rg's own behaviour — and the flag is simply not emitted.