|
|
@ -32,6 +32,7 @@ import shlex
|
|
|
|
import sys
|
|
|
|
import sys
|
|
|
|
from typing import (
|
|
|
|
from typing import (
|
|
|
|
Dict,
|
|
|
|
Dict,
|
|
|
|
|
|
|
|
Iterable,
|
|
|
|
List,
|
|
|
|
List,
|
|
|
|
Mapping,
|
|
|
|
Mapping,
|
|
|
|
NewType,
|
|
|
|
NewType,
|
|
|
@ -122,6 +123,14 @@ PODMAN_COMPOSE_EXEC = CommandArgs(
|
|
|
|
# === helpers
|
|
|
|
# === 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)
|
|
|
|
@wraps(print)
|
|
|
|
def error(*args, **kwargs):
|
|
|
|
def error(*args, **kwargs):
|
|
|
|
ret = print(*args, file=sys.stderr, **kwargs)
|
|
|
|
ret = print(*args, file=sys.stderr, **kwargs)
|
|
|
|