microsoft/sudo

'sudo config' output is always localized

brunvonlope opened this issue · 2 comments

Sudo for Windows version

1.0.1

Windows build number

10.0.26100.0

Other Software

I am trying to make a .ps1 script that relies on sudo for Windows and I need to ensure that the host machine config mode is set to 'normal' mode.

But running 'sudo config' outputs a localized message:

PS C:\Users\bruno> sudo config
O Sudo está atualmente no modo Embutido neste computador

I consider this a bug because this way the tool is simply non-portable.

Steps to reproduce

  1. Run sudo config

Expected Behavior

English message

Actual Behavior

Portuguese (Brazil) message

Hmm. Good catch about this - we should definitely include a non-localized version of this from the CLI.

in the meantime, you should be able to workaround this by looking at the values in

reg query HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Sudo
reg query HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Windows\Sudo

The Policies one will act as a max for the value in CurrentVersion, if it's set.