|
|
|
@ -32,6 +32,7 @@ import shlex
|
|
|
|
|
import sys
|
|
|
|
|
from typing import (
|
|
|
|
|
Dict,
|
|
|
|
|
Iterable,
|
|
|
|
|
List,
|
|
|
|
|
Mapping,
|
|
|
|
|
NewType,
|
|
|
|
@ -122,6 +123,14 @@ PODMAN_COMPOSE_EXEC = CommandArgs(
|
|
|
|
|
# === helpers
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def filter_cmds(command: Iterable[Optional[str]]) -> CommandArgs:
|
|
|
|
|
return CommandArgs([arg for arg in command if arg is not None])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def combine_cmds(*commands: CommandArgs | List[Optional[str]]) -> CommandArgs:
|
|
|
|
|
return CommandArgs([arg for cmd in commands for arg in filter_cmds(cmd)])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@wraps(print)
|
|
|
|
|
def error(*args, **kwargs):
|
|
|
|
|
ret = print(*args, file=sys.stderr, **kwargs)
|
|
|
|
|