deepseek-ai/deepseek-harness · error · Error
path must be a non-empty string when given
Error message
path must be a non-empty string when given
What it means
Error "path must be a non-empty string when given" thrown in deepseek-ai/deepseek-harness.
Source
Thrown at packages/fs/tool-fs-search/src/glob.ts:74
}
/** Validated `glob` arguments. */
export interface GlobInput {
pattern: string
path?: string
}
/**
* Validate value constraints the schema DSL can't express: a non-blank
* `pattern`, and a non-blank `path` when given. Throws a plain `Error` (an
* ordinary tool argument error) otherwise.
*
* @param args - the schema-validated `glob` arguments.
* @returns the accepted input, unchanged.
*/
export function parseGlobArgs(args: { pattern: string; path?: string }): GlobInput {
if (args.pattern.trim().length === 0) throw new Error('pattern must be a non-empty string')
if (args.path !== undefined && args.path.trim().length === 0) throw new Error('path must be a non-empty string when given')
return { pattern: args.pattern, ...args.path !== undefined ? { path: args.path } : {} }
}
/**
* Build the fixed `rg --files` argv for one `glob` call. Every
* model-controlled value ({@link GlobInput.pattern}, {@link GlobInput.path})
* is a plain argv element — no shell layer exists, so no quoting applies; the
* search root rides behind `--` so a leading-dash path can never be parsed as
* a flag. `--sort=modified` orders by modification time, `--no-ignore
* --hidden` searches ignored and hidden files, and
* {@link GLOB_VCS_EXCLUDES} keeps VCS metadata out.
*
* @param input - the validated arguments.
* @returns the complete ripgrep argument vector (excluding the binary itself).
*/
export function buildGlobCommand(input: GlobInput): string[] {
const parts = [
'--files',View on GitHub (pinned to b150a551b8)
When it happens
Trigger: Thrown at packages/fs/tool-fs-search/src/glob.ts:74 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of deepseek-ai/deepseek-harness@b150a551b8 (2026-08-24).
Data as JSON: /api/errors/99a95fcd01fe86e9.
Report an issue: GitHub.