Skip to content

Commit c358d11

Browse files
StaticRocketp12tic
authored andcommitted
podman_compose: fix in-pod argparse type
If "bool" is provided as an argparse type it will only evaluate to false if an empty string is provided. This lambda attempts to resolve this by filtering for "1" or "true". Signed-off-by: Randolph Sapp <[email protected]>
1 parent 58641f0 commit c358d11

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

podman_compose.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1927,7 +1927,7 @@ def _init_global_parser(parser):
19271927
"--in-pod",
19281928
help="pod creation",
19291929
metavar="in_pod",
1930-
type=bool,
1930+
type=lambda x: x.lower() in ["1", "true"],
19311931
default=True,
19321932
)
19331933
parser.add_argument(

0 commit comments

Comments
 (0)