Skip to content

Commit d1736c9

Browse files
authored
Merge pull request #15 from dscho/configure-locale
Ensure that a locale is configured
2 parents 8e357ea + deff42f commit d1736c9

File tree

5 files changed

+18
-1
lines changed

5 files changed

+18
-1
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,6 @@ jobs:
5151
gcc -o hello-world.exe hello-world.c
5252
hello="$(./hello-world.exe)"
5353
test 'Hello, world!' = "$hello"
54+
55+
# Verify that the locale is set, enabling `grep -P` to work
56+
test 123 = "$(printf '1248\n123\n' | grep -P '2(?!4)')"

.vscode/settings.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
{
22
"cSpell.ignoreRegExpList": [
33
"CHERE_INVOKING",
4+
"LC_CTYPE",
45
"SDK's",
56
"makepkg-git",
67
"mingw-w64-git",
8+
"mingw32",
79
"mingw64",
810
"vstfs://.*"
911
],

dist/index.js

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

main.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,13 @@ async function run(): Promise<void> {
6262
const msystem = architecture === 'i686' ? 'MINGW32' : 'MINGW64'
6363
core.addPath(`${outputDirectory}/${msystem.toLocaleLowerCase()}/bin`)
6464
core.exportVariable('MSYSTEM', msystem)
65+
if (
66+
!('LANG' in process.env) &&
67+
!('LC_ALL' in process.env) &&
68+
!('LC_CTYPE' in process.env)
69+
) {
70+
core.exportVariable('LC_CTYPE', 'C.UTF-8')
71+
}
6572
} catch (error) {
6673
core.setFailed(error.message)
6774
}

0 commit comments

Comments
 (0)