Skip to content

Commit 4c270b9

Browse files
committed
Allow run/exec -e with equals sign in value
Fixes: #798 Signed-off-by: Ari Pollak <ajp@aripollak.com>
1 parent f2f2f15 commit 4c270b9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

podman_compose.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2466,7 +2466,7 @@ async def compose_run(compose, args):
24662466
cnt["working_dir"] = args.workdir
24672467
env = dict(cnt.get("environment", {}))
24682468
if args.env:
2469-
additional_env_vars = dict(map(lambda each: each.split("="), args.env))
2469+
additional_env_vars = dict(map(lambda each: each.split("=", maxsplit=1), args.env))
24702470
env.update(additional_env_vars)
24712471
cnt["environment"] = env
24722472
if not args.service_ports:
@@ -2514,7 +2514,7 @@ async def compose_exec(compose, args):
25142514
env = dict(cnt.get("environment", {}))
25152515
if args.env:
25162516
additional_env_vars = dict(
2517-
map(lambda each: each.split("=") if "=" in each else (each, None), args.env)
2517+
map(lambda each: each.split("=", maxsplit=1) if "=" in each else (each, None), args.env)
25182518
)
25192519
env.update(additional_env_vars)
25202520
for name, value in env.items():

0 commit comments

Comments
 (0)