cli-plugins: PluginRunCommand: use cmd.Environ instead of os.Environ#5038
Merged
thaJeztah merged 1 commit intodocker:masterfrom Apr 29, 2024
Merged
cli-plugins: PluginRunCommand: use cmd.Environ instead of os.Environ#5038thaJeztah merged 1 commit intodocker:masterfrom
thaJeztah merged 1 commit intodocker:masterfrom
Conversation
Commit 5011759 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; - https://tip.golang.org/doc/go1.19#osexecpkgosexec - https://go-review.googlesource.com/c/go/+/401340 Replace the use of `os.Environ()` with `cmd.Environ()` to address that. Signed-off-by: Sebastiaan van Stijn <[email protected]>
Member
Author
|
cc @laurazard please double-check if this is the correct change to make 🙈 (I recall this was the recommended thing to do nowadays, but maybe plugins are special here 😅) |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5038 +/- ##
=======================================
Coverage 61.08% 61.09%
=======================================
Files 295 295
Lines 20660 20659 -1
=======================================
Hits 12621 12621
+ Misses 7142 7141 -1
Partials 897 897 |
vvoland
approved these changes
Apr 29, 2024
Member
Author
|
@vvoland I see you added the 26.1.1 milestone; was the intent to backport this, or should it be on 27.0 ? |
Collaborator
|
Yeah, it should be on 27.0 🙈 Still, looks like something that would be good to backport. |
Member
Author
|
Thx! Let me bring this one in 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Commit 5011759 implemented a fix that caused the current environment to be discarded, using
os.Environ(). On Windows,os.Environ()may produce an incorrect value forPWD, for which a new function was added in go1.19;Replace the use of
os.Environ()withcmd.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)