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

Function normalizeExecutableCommand

src/utils/exec.ts:503–512  ·  view source on GitHub ↗
(cmd: string)

Source from the content-addressed store, hash-verified

501}
502
503function normalizeExecutableCommand(cmd: string): string {
504 const candidate = normalizeExecutableLookup(cmd);
505 if (!candidate) {
506 throw new AppError('INVALID_ARGS', `Invalid executable command: ${JSON.stringify(cmd)}`, {
507 cmd,
508 hint: 'Use a bare command name from PATH or an absolute executable path.',
509 });
510 }
511 return candidate;
512}
513
514function createSpawnError(executable: string, cmd: string, args: string[], err: Error): AppError {
515 const code = (err as NodeJS.ErrnoException).code;

Callers 4

runSpawnedCommandFunction · 0.85
runCmdSyncFunction · 0.85
runCmdDetachedMonitoredFunction · 0.85
runCmdBackgroundFunction · 0.85

Calls 1

Tested by

no test coverage detected