Merge pull request 'vms/create: drop extra flake argument and make it work with local flakes' (#487) from Mic92-zerotier into main
All checks were successful
assets1 / test (push) Successful in 31s
checks / test (push) Successful in 47s
checks-impure / test (push) Successful in 1m30s

This commit is contained in:
clan-bot 2023-11-10 12:46:45 +00:00
commit 04c754caad
2 changed files with 3 additions and 8 deletions

View File

@ -193,7 +193,7 @@ def create_vm(vm: VmConfig, nix_options: list[str] = []) -> BuildVmTask:
def create_command(args: argparse.Namespace) -> None:
flake_url = args.flake
if not is_flake_url(args.flake):
if not is_flake_url(str(args.flake)):
flake_url = specific_flake_dir(args.flake)
vm = asyncio.run(inspect_vm(flake_url=flake_url, flake_attr=args.machine))
@ -203,10 +203,5 @@ def create_command(args: argparse.Namespace) -> None:
def register_create_parser(parser: argparse.ArgumentParser) -> None:
parser.add_argument("machine", type=str)
parser.add_argument(
"flake",
type=str,
help="name of the flake to create machine for",
)
parser.add_argument("machine", type=str, help="machine in the flake to create")
parser.set_defaults(func=create_command)

View File

@ -40,4 +40,4 @@ def test_create(
age_keys[0].pubkey,
]
)
cli.run(["vms", "create", "vm1", test_flake_with_core.name])
cli.run(["vms", "create", "vm1"])