-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix locale issues with WSL version detection #20240
Fix locale issues with WSL version detection #20240
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: n1hility The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM
Needs the magic [NO NEW TESTS NEEDED]
to pass CI
@@ -50,20 +50,13 @@ func IsWSLInstalled() bool { | |||
|
|||
func IsWSLStoreVersionInstalled() bool { | |||
cmd := SilentExecCmd("wsl", "--version") | |||
out, err := cmd.StdoutPipe() | |||
cmd.Stdout = nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non-blocking nit: consider using a bytes.Buffer
for stdout and stderr and write that to logrus.Debugf
.
Since wsl --version triggers help, which triggers an error code, use that instead of text detection. [NO NEW TESTS NEEDED] Signed-off-by: Jason T. Greene <[email protected]>
e86858c
to
cbca395
Compare
/lgtm |
/hold |
well that was fun, so much for computers thinking ... |
/cherry-pick v4.7 |
@baude: new pull request created: #20243 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Fixes #20209
Since wsl --version triggers help, which triggers an error code, use that instead of text detection.