Fix KeyError accessing config. (#620)

This commit is contained in:
Thomas E Lackey 2023-10-31 12:29:19 -05:00 committed by GitHub
parent d854dd5c81
commit fd5779f967
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -261,7 +261,7 @@ def init(ctx, config, output, map_ports_to_host):
config_variables = _parse_config_variables(config)
if config_variables:
# Implement merge, since update() overwrites
orig_config = spec_file_content["config"]
orig_config = spec_file_content.get("config", {})
new_config = config_variables["config"]
merged_config = {**new_config, **orig_config}
spec_file_content.update({"config": merged_config})