From 4c270b9116503c08587289e4f12144053c6b6613 Mon Sep 17 00:00:00 2001 From: Ari Pollak Date: Fri, 1 Mar 2024 16:13:36 -0500 Subject: [PATCH] Allow run/exec -e with equals sign in value Fixes: #798 Signed-off-by: Ari Pollak --- podman_compose.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/podman_compose.py b/podman_compose.py index 702a5d6..a7bd569 100755 --- a/podman_compose.py +++ b/podman_compose.py @@ -2466,7 +2466,7 @@ async def compose_run(compose, args): cnt["working_dir"] = args.workdir env = dict(cnt.get("environment", {})) if args.env: - additional_env_vars = dict(map(lambda each: each.split("="), args.env)) + additional_env_vars = dict(map(lambda each: each.split("=", maxsplit=1), args.env)) env.update(additional_env_vars) cnt["environment"] = env if not args.service_ports: @@ -2514,7 +2514,7 @@ async def compose_exec(compose, args): env = dict(cnt.get("environment", {})) if args.env: additional_env_vars = dict( - map(lambda each: each.split("=") if "=" in each else (each, None), args.env) + map(lambda each: each.split("=", maxsplit=1) if "=" in each else (each, None), args.env) ) env.update(additional_env_vars) for name, value in env.items():