Skip to content

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

Merged
ctsdownloads merged 1 commit intoFrameworkComputer:mainfrom
iguanito:fixing_internationalization_nmcli
Apr 13, 2025
Merged

fix internationalization issue while calling nmcli and then grepping the yes word#2
ctsdownloads merged 1 commit intoFrameworkComputer:mainfrom
iguanito:fixing_internationalization_nmcli

Conversation

@iguanito
Copy link
Contributor

@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

@iguanito
Copy link
Contributor Author

@ctsdownloads Any chance to get this PR reviewed and merged?

@ctsdownloads ctsdownloads merged commit d15d5db into FrameworkComputer:main Apr 13, 2025
@ctsdownloads
Copy link
Collaborator

Appreciate the revision, sorry for the delay.

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

2 participants