Fix some type issues

This commit is contained in:
Johannes Kirschbauer
2024-07-11 17:05:57 +02:00
parent 24203666d1
commit 473a21f1d8
2 changed files with 12 additions and 9 deletions

View File

@@ -63,18 +63,11 @@ def create_clan(options: CreateOptions) -> CreateClanResponse:
)
out = run(command, cwd=directory)
# Write inventory.json file
inventory = Inventory.load_file(directory)
if options.meta is not None:
inventory.meta = options.meta
## Begin: setup git
command = nix_shell(["nixpkgs#git"], ["git", "init"])
out = run(command, cwd=directory)
cmd_responses["git init"] = out
# Persist also create a commit message for each change
inventory.persist(directory, "Init inventory")
command = nix_shell(["nixpkgs#git"], ["git", "add", "."])
out = run(command, cwd=directory)
cmd_responses["git add"] = out
@@ -88,6 +81,14 @@ def create_clan(options: CreateOptions) -> CreateClanResponse:
)
out = run(command, cwd=directory)
cmd_responses["git config"] = out
## End: setup git
# Write inventory.json file
inventory = Inventory.load_file(directory)
if options.meta is not None:
inventory.meta = options.meta
# Persist creates a commit message for each change
inventory.persist(directory, "Init inventory")
command = ["nix", "flake", "update"]
out = run(command, cwd=directory)