Duplicated environment variables
Closed this issue · 3 comments
chrisfarms commented
What
Any existing environment variables are not overridden when setting up the env for executing commands.
Steps to reproduce
$ PGDATABASE=xxx cf conduit posty -- env | grep PGDATABASE
PGDATABASE=xxx
PGDATABASE=rdsbroker_8xxxxx_2xxxxx_bxxx_bxxxxxxxxx
What is expected
Only the single (relevant) PGDATABASE variable in the environment.
Notes
Overwrite existing environment variables before exec.
alext commented
We could fix this by upgrading to Go 1.9 - https://golang.org/doc/go1.9#os/exec
46bit commented
I'm working on this in the test-for-env-mishandling
branch, following an approach suggested by @alext in #9 (comment).
camelpunch commented
Fixed by #17