MCPcopy Index your code
hub / github.com/callstack/agent-device / resolveFileOverridePath

Function resolveFileOverridePath

src/utils/exec.ts:249–263  ·  view source on GitHub ↗
(
  rawPath: string | undefined,
  envName: string,
)

Source from the content-addressed store, hash-verified

247}
248
249export async function resolveFileOverridePath(
250 rawPath: string | undefined,
251 envName: string,
252): Promise<string | undefined> {
253 const candidate = normalizeOverridePath(rawPath, envName, 'file');
254 if (!candidate) return undefined;
255 if (!(await isFilePath(candidate))) {
256 throw new AppError(
257 'TOOL_MISSING',
258 `${envName} points to a missing or non-file path: ${candidate}`,
259 { envName, path: candidate },
260 );
261 }
262 return candidate;
263}
264
265export function runCmdSync(cmd: string, args: string[], options: ExecOptions = {}): ExecResult {
266 const executable = normalizeExecutableCommand(cmd);

Callers 1

Calls 2

normalizeOverridePathFunction · 0.85
isFilePathFunction · 0.85

Tested by

no test coverage detected