* Wrap command with sandbox, optionally specifying the shell to use
( command: string, binShell?: string, customConfig?: Partial<SandboxRuntimeConfig>, abortSignal?: AbortSignal, )
| 702 | * Wrap command with sandbox, optionally specifying the shell to use |
| 703 | */ |
| 704 | async function wrapWithSandbox( |
| 705 | command: string, |
| 706 | binShell?: string, |
| 707 | customConfig?: Partial<SandboxRuntimeConfig>, |
| 708 | abortSignal?: AbortSignal, |
| 709 | ): Promise<string> { |
| 710 | // If sandboxing is enabled, ensure initialization is complete |
| 711 | if (isSandboxingEnabled()) { |
| 712 | if (initializationPromise) { |
| 713 | await initializationPromise |
| 714 | } else { |
| 715 | throw new Error('Sandbox failed to initialize. ') |
| 716 | } |
| 717 | } |
| 718 | |
| 719 | return BaseSandboxManager.wrapWithSandbox( |
| 720 | command, |
| 721 | binShell, |
| 722 | customConfig, |
| 723 | abortSignal, |
| 724 | ) |
| 725 | } |
| 726 | |
| 727 | /** |
| 728 | * Initialize sandbox with log monitoring enabled by default |
nothing calls this directly
no test coverage detected