by bradfitz · 9y ago · 0 comments
We went with the bash behavior (latest one wins), which also means all the code previously using:
cmd.Env = append(os.Environ(), "KEY=newvalue")
... now actually works reliably. Previously, if KEY=oldvalue was already defined, what you got depended on your luck with the child program. Either old, new, or random.
File a bug if you see a regression.
If you really want to do something nasty and intentionally confuse your child processes, the lower-level os.StartProcess and syscall packages are there for you. :)