( settings: Settings, argv: SandboxCliArgs, )
| 92 | } |
| 93 | |
| 94 | export async function loadSandboxConfig( |
| 95 | settings: Settings, |
| 96 | argv: SandboxCliArgs, |
| 97 | ): Promise<SandboxConfig | undefined> { |
| 98 | const sandboxOption = argv.sandbox ?? settings.sandbox; |
| 99 | const command = getSandboxCommand(sandboxOption); |
| 100 | |
| 101 | const packageJson = await getPackageJson(); |
| 102 | const image = |
| 103 | argv.sandboxImage ?? |
| 104 | process.env['ANUS_SANDBOX_IMAGE'] ?? |
| 105 | packageJson?.config?.sandboxImageUri; |
| 106 | |
| 107 | return command && image ? { command, image } : undefined; |
| 108 | } |
no test coverage detected