(
command: string,
args: string[],
options: ExecutionOptions,
)
| 669 | }; |
| 670 | |
| 671 | export async function execute( |
| 672 | command: string, |
| 673 | args: string[], |
| 674 | options: ExecutionOptions, |
| 675 | ): Promise<UnprocessedExecResult> { |
| 676 | checkExecOptions(options); |
| 677 | const type = execProps('executionType', 'none'); |
| 678 | const dispatchEntry = executeDispatchTable[type]; |
| 679 | if (!dispatchEntry) throw new Error(`Bad sandbox type ${type}`); |
| 680 | if (!command) throw new Error('No executable provided'); |
| 681 | const unbuffered = await maybeUnbuffer(command, args); |
| 682 | return await dispatchEntry(unbuffered.command, unbuffered.args, options); |
| 683 | } |
| 684 | |
| 685 | export function maybeRemapJailedDir(customCwd: string): string { |
| 686 | return execProps('executionType', 'none') == 'nsjail' ? jailedHomeDir : customCwd; |
nothing calls this directly
no test coverage detected