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

fix internationalization issue while calling nmcli and then grepping the yes word #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

iguanito
Copy link

@iguanito iguanito commented Nov 12, 2024

The output returned by nmcli is localized, i.e. the output depends on the language of current user executing it. Grepping "yes" in the output will fail if the current user language is not English:

$  LC_ALL=fr_FR.UTF-8 nmcli -t -f active,device d wifi list
non:wlp1s0
non:wlp1s0
non:wlp1s0
oui:wlp1s0
non:wlp1s0

This commit sets the language to English when calling nmcli so the word "yes" can be successfully grepped.

See https://networkmanager.pages.freedesktop.org/NetworkManager/NetworkManager/nmcli.html > Internationalization notes

Fixes #3

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

Successfully merging this pull request may close these issues.

Get the active WiFi interface name may fail if current user language is not English
1 participant