nvm-windows
nvm-windows copied to clipboard
Error output is unreadable when using Simplified Chinese as system language
Issue:
This is an example when I run the nvm use 12
WITHOUT administrator privilege:
exit status 5: �ܾ����ʡ�
exit status 1: ���ļ��Ѵ���ʱ�����������ļ���
How To Reproduce:
- Setup the system language as Simplified Chinese (简体中文)
- Execute
nvm use 12
(make sure you've already installed it)
Expected Behavior:
The error output should be readable.
Desktop:
- OS: Windows 10
After searching around go and its charset related document, the workaround maybe not using string comparison here: https://github.com/coreybutler/nvm-windows/blob/master/src/nvm.go#L890-L898 and generate output manually.
同样的问题
这得要使用管理员打开
这得要使用管理员打开
问题在于, 如果这个报错信息能清晰明了的说明需要使用管理员权限来运行的话, 就能减少很多本地试错的时间.
If we can told the user that we need Administatior permission to run nvm in the error output clearly, then we could save a lot of debuging time for the user.
这得要使用管理员打开
确实,我也遇到这个问题了,多谢提醒
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.
It looks like you need a way to prevent the bot from marking this issue stale. :rofl:
If anyone using simplified Chinese can test with v1.1.11, I'd appreciate it. There is a new encoding mechanism that may resolve this. 🤞
I'm trying the nvm v1.1.11 on Windows 11 with simplified Chinese and a non-admin local account.
When I tring to nvm use lts
, there is a dialog shows up and asking for admin privilege. 👍
When I clicked agree, then nvm switch to lts successfuly.
Then I tried again with disagree, it switch to lts successfully again.
And I tried nvm off
with disagree, it turned off nvm 🤣
I'm not certain if this is a bug with nvm or Windows.
If its necessary, I'll capture a screen record and open another issue for it.
@DevDengChao thank you for testing!
nvm off
with disagree could still work, depending on your setup. I'm not sure why Windows would allow it if you don't agree to elevate permissions, so it might be worth investigating separately. It would be better to track that in another issue though (otherwise it will get buried in this one).
I think the latest updates catch/handle the original error correctly now (i.e. the exit codes), and it looks like the responses are readable now.
If anyone comes across this in the future, please open a new issue referencing this one.