File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020 strategy :
2121 matrix :
2222 os :
23+ - ubuntu-slim
2324 - ubuntu-22.04
2425 - ubuntu-22.04-arm
2526 - ubuntu-24.04
6768 strategy :
6869 matrix :
6970 os :
71+ - ubuntu-slim
7072 - ubuntu-22.04
7173 - ubuntu-22.04-arm
7274 - ubuntu-24.04
Original file line number Diff line number Diff line change @@ -118,6 +118,14 @@ runs:
118118 DEFAULT_ENCODING="UTF-8"
119119 DEFAULT_LOCALE="en_US.$DEFAULT_ENCODING"
120120
121+ # Some runners (e.g., `ubuntu-slim`) may not include the `en_US.UTF-8`
122+ # locale by default. Ensure the required locale exists by generating it
123+ # if missing.
124+ if ! python -c "from locale import *; setlocale(LC_ALL, '$DEFAULT_LOCALE')" \
125+ >/dev/null 2>&1; then
126+ sudo locale-gen "$DEFAULT_LOCALE"
127+ fi
128+
121129 # Unfortunately 'initdb' could only receive a password via file on disk
122130 # or prompt to enter on. Prompting is not an option since we're running
123131 # in non-interactive mode.
You can’t perform that action at this time.
0 commit comments