have blend handle no distro being specified itself
This commit is contained in:
parent
3eaf53104a
commit
77e9293295
1 changed files with 5 additions and 1 deletions
6
user
6
user
|
@ -164,7 +164,11 @@ def create_container(container_name, distro):
|
||||||
if subprocess.run(['podman', 'container', 'exists', container_name], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL).returncode == 0:
|
if subprocess.run(['podman', 'container', 'exists', container_name], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL).returncode == 0:
|
||||||
error(f'container {colors.bold}{container_name}{colors.reset} already exists')
|
error(f'container {colors.bold}{container_name}{colors.reset} already exists')
|
||||||
exit(1)
|
exit(1)
|
||||||
exit(subprocess.run(['blend', 'create-container', '-cn', container_name, '-d', distro]).returncode)
|
args = ['blend', 'create-container', '-cn', container_name]
|
||||||
|
# blend handles no distro being specified already
|
||||||
|
if distro:
|
||||||
|
args.extend(['-d', distro])
|
||||||
|
exit(subprocess.run(args).returncode)
|
||||||
|
|
||||||
@cli.command("delete-container")
|
@cli.command("delete-container")
|
||||||
@click.argument('container')
|
@click.argument('container')
|
||||||
|
|
Loading…
Reference in a new issue