67e6ba0d09
This restores compatibility with go1.18, which was broken since commit; https://github.com/moby/moby/commit/c062238ea4274e9af98cb96dcfe31a0dfc763440 cmd.Environ() is new in go1.19, and not needed for this specific case. Without this, trying to use this package in code that uses go1.18 will fail; builder/remotecontext/git/gitutils.go:216:23: cmd.Environ undefined (type *exec.Cmd has no field or method Environ) Changing to use `os.Environ()` instead restores compatibility with go1.18 Full diff: https://github.com/docker/docker/compare/f9cb47a052be6a5f73e3077773ffa6ccbde1285d...5aac513617f072b15322b147052cbda0d451d389 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>