Skip to content

safeExecFile

View as Markdown
function safeExecFile(
file,
args,
o?
): Promise<
| {
args: string[];
file: string;
}
| null>;

Defined in: node/exe.ts:201

What to hand execFile / spawn for file without ever searching the current directory. POSIX, or a path (absolute or with a separator): file unchanged. Windows bare names: a known system tool → systemTool; anything else → resolveCommand (PATH only; npm shims and .cmd files made startable without a shell). Null when a bare name is not found.

Parameter Type
file string
args string[]
o? ResolveOptions

Promise< | { args: string[]; file: string; } | null>