-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Set Locale #762
Comments
I am able to repro the problem on a fresh Ubuntu 18.04 Azure VM without the runner at all. |
printf is built in command of bash and a bash process does not catch up the locale settings changed within the same process. The following code in the above workflow works as expected
|
@dsame |
@hugoj-goncalves , I believe it will also work if we use different steps for setting locale and testing it because the second step will be new shell session:
|
@maxim-lobanov That definitely is not the case as my first test was like that 😞 |
|
@al-cheb oh wow... It's still a little confusing for me but I guess this issue is solved. Sorry about the trouble. |
Just in case somebody stumbles on this thread, the following command in the above comments does not seem right:
Since |
@galaxy4public, Just for example:
Find a parameter $1:
As you can see $1 is the first argument
|
Well, I trust that on your system it works like you showcased, however Ubuntu's man page does not mention such a behaviour and other distros do not follow it too (e.g. on Archlinux the script is pretty simple and does not respect any arguments to |
Hi! I am closing this issue since the original question was solved. |
Hey, I am experiencing some issues related to the locale settings inside a GitHub Actions pipeline. I am trying to run test cases with x3270 using Robotframework. This is the link to my fork. This is what the .yml looks like:
This is the error I am getting: I am struggling to understand why the encoding is not set correctly. Any help would be very much appreciated! |
Hey, @robinmatz
|
Hi @al-cheb, the solution you provided worked perfectly. Thank you so much! As for the tests hanging:
I assume you checked out from master, where the file had not yet been adapted. Just out of curiosity:
But that also resulted in the original error. Why is that? |
@BrightRan @al-cheb @robinmatz steps:
- name: SetLocale
run: |
sudo apt-get update && sudo apt-get install tzdata locales -y
sudo localedef -f CP1252 -i /usr/share/i18n/locales/pt_BR /usr/lib/locale/pt_BR.CP1252
sudo locale-gen pt_BR.UTF-8
sudo locale-gen pt_BR.CP1252
sudo locale-gen
locale -a
echo "Actual locale"
locale
echo "Actual numeric settings"
locale -c -k LC_NUMERIC
echo "LANG Variable"
echo "$LANG"
echo "LocaleCtl"
localectl status i am getting this error: |
Hey @insinfo. echo "pt_BR.CP1252 CP1252" | sudo tee -a /usr/share/i18n/SUPPORTED I'm not sure that this is correct but at least it makes script completing with no error. |
Thank you for your help. I updated like this and now it seems to be working steps:
- name: SetLocale
run: |
sudo apt-get update && sudo apt-get install tzdata locales -y
sudo localedef -f CP1252 -i /usr/share/i18n/locales/pt_BR /usr/lib/locale/pt_BR.CP1252
sudo echo 'pt_BR.CP1252 CP1252' | sudo tee -a /etc/locale.gen > /dev/null
sudo mkdir /usr/local/share/i18n
sudo touch /usr/local/share/i18n/SUPPORTED
sudo echo 'pt_BR.CP1252 CP1252' | sudo tee -a /usr/local/share/i18n/SUPPORTED > /dev/null
sudo locale-gen pt_BR.UTF-8
sudo locale-gen pt_BR
sudo locale-gen
locale -a
echo "Actual locale"
locale
echo "Actual numeric settings"
locale -c -k LC_NUMERIC
echo "LANG Variable"
echo "$LANG"
echo "LocaleCtl"
localectl status
https://github.com/insinfo/postgres_fork/blob/master/.github/workflows/dart.yml |
exemplo apresentado em actions/runner-images#762 close #231
Estou recebendo erro também, porém o meu yml é escrito para o .NET Framework 4.8, alguém teria a solução por favor ? name: CI - Run Unit Tests on: env: jobs:
|
Discussion Number: #10067 |
In this ticket, the user wants to change the runner machine's locale language to PT-BR, he uses the below step to do set the locale:
The locale language seems changed successfully, but when he tries to check the number formats and date formats, they are shown inconsistent with the locale language.
The text was updated successfully, but these errors were encountered: