Skip to content

Commit

Permalink
feat: individually capture defaults so we dont override everything in…
Browse files Browse the repository at this point in the history
… the object
  • Loading branch information
Apollorion committed Jun 6, 2024
1 parent 54bf7d4 commit d5b0c20
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions spacemk/commands/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,13 @@ def generate(config):
def default(value, default):
return value if value is not None else default

spacelift = default(config.get("generator.spacelift"), {"manage_state": True})
github = default(config.get("generator.github"), {"custom_app": False})
generation_config = {"spacelift": spacelift, "github": github}
generation_config = {
"spacelift": {
"manage_state": default(config.get("generator.spacelift.manage_state"), True)
}, "github": {
"custom_app": default(config.get("generator.github.custom_app"), False)
}
}

generator = Generator()
generator.generate(extra_vars=config.get("generator.extra_vars"), generation_config=generation_config)

0 comments on commit d5b0c20

Please sign in to comment.