docker / cli

The Docker CLI
Apache License 2.0
4.77k stars 1.89k forks source link

[26.1 backport] cli-plugins: PluginRunCommand: use cmd.Environ instead of os.Environ #5047

Closed vvoland closed 2 months ago

vvoland commented 2 months ago

Commit 50117590567998307eba377295a1ec24e214ccc7 implemented a fix that caused the current environment to be discarded, using os.Environ(). On Windows, os.Environ() may produce an incorrect value for PWD, for which a new function was added in go1.19;

Replace the use of os.Environ() with cmd.Environ() to address that.

- What I did

- How I did it

- How to verify it

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

codecov-commenter commented 2 months ago

Codecov Report

Attention: Patch coverage is 0% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 61.08%. Comparing base (1e6db5d) to head (1c6a8ec).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## 26.1 #5047 +/- ## ======================================= Coverage 61.08% 61.08% ======================================= Files 295 295 Lines 20664 20663 -1 ======================================= Hits 12623 12623 + Misses 7143 7142 -1 Partials 898 898 ```