Skip to content

Commit

Permalink
Fix passing of env variables to docker build (#310)
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewSuntup committed Nov 3, 2021
1 parent 0a6928e commit 50c41eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## HEAD (Unreleased)
_(none)_
* Fix passing of `env` parameter in `docker.DockerBuildArgs` in the Python SDK [#310](https://github.com/pulumi/pulumi-docker/issues/310)

---

Expand Down
4 changes: 3 additions & 1 deletion sdk/python/pulumi_docker/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,9 @@ def run_command_that_can_fail(
cmd.extend(args)

if env is not None:
env = os.environ.copy().update(env)
environ = os.environ.copy()
environ.update(env)
env = environ

process = subprocess.Popen(cmd, env=env, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, stdin=subprocess.PIPE, encoding="utf-8")
Expand Down

0 comments on commit 50c41eb

Please sign in to comment.