Skip to content
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

WSL 2 - Update-Help is not working. #13167

Closed
MaximoTrinidad opened this issue Jul 13, 2020 · 10 comments
Closed

WSL 2 - Update-Help is not working. #13167

MaximoTrinidad opened this issue Jul 13, 2020 · 10 comments
Labels
Issue-Question Resolution-Answered

Comments

@MaximoTrinidad
Copy link

MaximoTrinidad commented Jul 13, 2020

This is only happening in Windows Subsystem for Linux (WSL) when executing the cmdlet Update-Help is not doing anything.

Below sample is running "Update-Help" in Ubuntu 18.04 VM:

Ubuntu_UpdateHelp_01_2020-07-13_10-27-36

Ubuntu_UpdateHelp_02_2020-07-13_10-27-36

In WSL, it doesn't give any errors, and quickly return to the prompt:

WSL_UpdateHelp_012020-07-13_10-39-10

Steps to reproduce

sudo pwsh
Update-Help -Force

Expected behavior

Display update progress and, to at least, ends with some errors.


Actual behavior

No progress, and it ends quickly. No update was performed.


Environment data

Windows 10 Version 2004 (OS Build 19041.329)

PS /home/maxt> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.0.2
PSEdition                      Core
GitCommitId                    7.0.2
OS                             Linux 4.19.104-microsoft-standard #1 SMP Wed Feb 19 06:37:35 UTC 2020
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
@MaximoTrinidad MaximoTrinidad added the Issue-Question label Jul 13, 2020
@daxian-dbw
Copy link
Member

daxian-dbw commented Jul 13, 2020

/cc @adityapatwardhan @sdwheeler

@MaximoTrinidad MaximoTrinidad changed the title WSL 2 - Update-Help is not loading working. WSL 2 - Update-Help is not working. Jul 13, 2020
@adityapatwardhan
Copy link
Member

adityapatwardhan commented Jul 13, 2020

Updating the language from C.UTF-8 to en-US.UTF-8 fixes the issue.

LANG                           en_US.UTF-8
LC_ALL                         en_US.UTF-8

Let me know if that works for you.

@sdwheeler
Copy link
Collaborator

sdwheeler commented Jul 13, 2020

@adityapatwardhan Oh interesting. Sounds like something we need to document.

How do you do that? Is that a WSL setting or an OS setting? Is it the same for all distributions?

@MaximoTrinidad
Copy link
Author

MaximoTrinidad commented Jul 14, 2020

@adityapatwardhan

So, I'm assuming this is a Linux environment variable?

## Current values:
(base) maxt@sapien01:~$ echo $LANG
C.UTF-8
(base) maxt@sapien01:~$ echo $LC_ALL
-EMPTY-
(base) maxt@sapien01:~$

Updated:

(base) maxt@sapien01:~$
(base) maxt@sapien01:~$ export LC_ALL='en_US.UTF-8'
(base) maxt@sapien01:~$ export LANG='en_US.UTF-8'
(base) maxt@sapien01:~$
(base) maxt@sapien01:~$ echo $LC_ALL
en_US.UTF-8
(base) maxt@sapien01:~$ echo $LANG
en_US.UTF-8
(base) maxt@sapien01:~$

It works!

WSL_UpdateHelp_fix_2020-07-13_10-39-10

Thanks... But, to whom this need to be addressed to?
:P

@daxian-dbw daxian-dbw added the Resolution-Answered label Jul 14, 2020
@daxian-dbw
Copy link
Member

daxian-dbw commented Jul 14, 2020

@adityapatwardhan @sdwheeler Is this something we should fix or the work around is by design for Linux? If it's the latter, then can one of you please open a doc issue?

@sdwheeler
Copy link
Collaborator

sdwheeler commented Jul 14, 2020

@daxian-dbw @adityapatwardhan Does this affect all distributions? Is this specific to WSL? We can document this but, depending on the scope of the issue, we might want to fix this.

@vexx32
Copy link
Collaborator

vexx32 commented Jul 14, 2020

Can we have pwsh treat C.UTF-8 on Unix as en.UTF-8? I don't think it makes sense to make a specific exception for pwsh's in-box help only (other modules will also see the same issue if they utilise MAML-format help).

@adityapatwardhan
Copy link
Member

adityapatwardhan commented Jul 14, 2020

To my knowledge, the default locale on Ubuntu 18.04 changed to C.UTF.8. We do not have help content for that locale, hence we fail to get help. We explicitly set the locale to en-us in our docker images hence it works over there.

We should definitely document this. Another workaround that might work is to use Update-Help -uiculture en-us.

@MaximoTrinidad
Copy link
Author

MaximoTrinidad commented Jul 14, 2020

Cool @adityapatwardhan

Thanks for the workarounds!
;)

@msftbot
Copy link

msftbot bot commented Jul 16, 2020

This issue has been marked as answered and has not had any activity for 1 day. It has been closed for housekeeping purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Question Resolution-Answered
Projects
None yet
Development

No branches or pull requests

5 participants