File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -455,6 +455,19 @@ def cmd_start(
455
455
# pass the parsed cli params to the start infra command
456
456
params = click .get_current_context ().params
457
457
458
+ if network :
459
+ # reconciles the network config and makes sure that MAIN_DOCKER_NETWORK is set automatically if
460
+ # `--network` is set.
461
+ if config .MAIN_DOCKER_NETWORK :
462
+ if config .MAIN_DOCKER_NETWORK != network :
463
+ raise click .ClickException (
464
+ f"Values of MAIN_DOCKER_NETWORK={ config .MAIN_DOCKER_NETWORK } and --network={ network } "
465
+ f"do not match"
466
+ )
467
+ else :
468
+ config .MAIN_DOCKER_NETWORK = network
469
+ os .environ ["MAIN_DOCKER_NETWORK" ] = network
470
+
458
471
if detached :
459
472
bootstrap .start_infra_in_docker_detached (console , params )
460
473
else :
You can’t perform that action at this time.
0 commit comments