-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
Locale issues on Windows #34
Comments
You could also start |
@gajus
Removing |
This bug is preventing me from adopting eslint-plugin-sql. |
nwjsmith
added a commit
to nwjsmith/pg-formatter
that referenced
this issue
Mar 6, 2024
It is safe to run the `pg_format` executable without hard-coding the locale. Fixes gajus#34
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm using the Strawberry Perl distro on Windows, along with Node 20.10.0. When I invoke
pg-formatter
out of the box, it does what it's supposed to, but then it also outputs:I'm a newbie with Perl and haven't been able to find much info about locale handling on Windows. But after a lot of poking around, I tracked this down to:
pg-formatter/src/format.ts
Lines 121 to 123 in 6e1c8af
If I change the value of
LC_ALL
toC
on line 122, then everything works fine with no warnings. (It also works if I remove lines 121-123 entirely.)Is using
C
an appropriate fix on Windows? Or is there a better approach? In either case, can this be built intopg-formatter
by checkingprocess.platform
?The text was updated successfully, but these errors were encountered: