fix: Change sandbox network check command for docker (#907)

This commit is contained in:
Tolik Malibroda 2025-06-11 00:13:36 +02:00 committed by GitHub
parent fa27bc832f
commit e73d4752df
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -496,7 +496,7 @@ export async function start_sandbox(sandbox: string) {
// if using proxy, switch to internal networking through proxy // if using proxy, switch to internal networking through proxy
if (proxy) { if (proxy) {
execSync( execSync(
`${sandbox} network exists ${SANDBOX_NETWORK_NAME} || ${sandbox} network create --internal ${SANDBOX_NETWORK_NAME}`, `${sandbox} network inspect ${SANDBOX_NETWORK_NAME} || ${sandbox} network create --internal ${SANDBOX_NETWORK_NAME}`,
); );
args.push('--network', SANDBOX_NETWORK_NAME); args.push('--network', SANDBOX_NETWORK_NAME);
// if proxy command is set, create a separate network w/ host access (i.e. non-internal) // if proxy command is set, create a separate network w/ host access (i.e. non-internal)
@ -504,7 +504,7 @@ export async function start_sandbox(sandbox: string) {
// this allows proxy to work even on rootless podman on macos with host<->vm<->container isolation // this allows proxy to work even on rootless podman on macos with host<->vm<->container isolation
if (proxyCommand) { if (proxyCommand) {
execSync( execSync(
`${sandbox} network exists ${SANDBOX_PROXY_NAME} || ${sandbox} network create ${SANDBOX_PROXY_NAME}`, `${sandbox} network inspect ${SANDBOX_PROXY_NAME} || ${sandbox} network create ${SANDBOX_PROXY_NAME}`,
); );
} }
} }