Skip to content

Commit

Permalink
Allow run/exec -e with equals sign in value
Browse files Browse the repository at this point in the history
Fixes: #798
Signed-off-by: Ari Pollak <ajp@aripollak.com>
  • Loading branch information
aripollak committed Mar 1, 2024
1 parent e0edd5d commit b2531e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions podman_compose.py
Original file line number Diff line number Diff line change
Expand Up @@ -2496,7 +2496,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:
Expand Down Expand Up @@ -2544,7 +2544,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():
Expand Down

0 comments on commit b2531e5

Please sign in to comment.