diff --git a/blend b/blend index d6df431..bc50db5 100755 --- a/blend +++ b/blend @@ -102,7 +102,7 @@ def get_distro(): return distro_map[args.distro] except: error(f"{args.distro} isn't supported by blend.") - exit() + exit(1) def list_containers(): diff --git a/user b/user index ed8d6a4..2b519c6 100755 --- a/user +++ b/user @@ -161,14 +161,10 @@ def create_container(container_name, distro): ''' Create a container ''' - if distro not in ('arch', 'almalinux-9', 'crystal-linux', 'debian', 'fedora-38', 'kali-linux', 'neurodebian-bookworm', 'rocky-linux', 'ubuntu-22.04', 'ubuntu-23.04'): - error( - f'distro {colors.bold}{distro}{colors.reset} not supported') 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') exit(1) - subprocess.run(['blend', 'create-container', '-cn', container_name, '-d', distro]) - + exit(subprocess.run(['blend', 'create-container', '-cn', container_name, '-d', distro]).returncode) @cli.command("delete-container") @click.argument('container')