Skip to content

Commit

Permalink
compat: make sure we don't over LC_CYTPE / LANG
Browse files Browse the repository at this point in the history
If --action_env is being passed then the repo expects it to hit all
the actions, by forcing LANG/LC_CTYPE to override we're removing that
use case
  • Loading branch information
manuelnaranjo committed Dec 27, 2023
1 parent de2eedd commit 688d7ac
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions pkg/legacy/rpm.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ def _pkg_rpm_impl(ctx):
inputs = files,
outputs = [ctx.outputs.rpm],
env = {
"LANG": "en_US.UTF-8",
"LC_CTYPE": "UTF-8",
"LANG": ctx.configuration.default_shell_env.get("LANG", "en_US.UTF-8"),
"LC_CTYPE": ctx.configuration.default_shell_env.get("LC_CTYPE", "UTF-8"),
"PYTHONIOENCODING": "UTF-8",
"PYTHONUTF8": "1",
},
Expand Down
4 changes: 2 additions & 2 deletions pkg/private/deb/deb.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ def _pkg_deb_impl(ctx):
inputs = files,
outputs = [output_file, changes_file],
env = {
"LANG": "en_US.UTF-8",
"LC_CTYPE": "UTF-8",
"LANG": ctx.configuration.default_shell_env.get("LANG", "en_US.UTF-8"),
"LC_CTYPE": ctx.configuration.default_shell_env.get("LC_CTYPE", "UTF-8"),
"PYTHONIOENCODING": "UTF-8",
"PYTHONUTF8": "1",
},
Expand Down
4 changes: 2 additions & 2 deletions pkg/private/tar/tar.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ def _pkg_tar_impl(ctx):
arguments = [args],
outputs = [output_file],
env = {
"LANG": "en_US.UTF-8",
"LC_CTYPE": "UTF-8",
"LANG": ctx.configuration.default_shell_env.get("LANG", "en_US.UTF-8"),
"LC_CTYPE": ctx.configuration.default_shell_env.get("LC_CTYPE", "UTF-8"),
"PYTHONIOENCODING": "UTF-8",
"PYTHONUTF8": "1",
},
Expand Down
4 changes: 2 additions & 2 deletions pkg/private/zip/zip.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ def _pkg_zip_impl(ctx):
arguments = [args],
outputs = [output_file],
env = {
"LANG": "en_US.UTF-8",
"LC_CTYPE": "UTF-8",
"LANG": ctx.configuration.default_shell_env.get("LANG", "en_US.UTF-8"),
"LC_CTYPE": ctx.configuration.default_shell_env.get("LC_CTYPE", "UTF-8"),
"PYTHONIOENCODING": "UTF-8",
"PYTHONUTF8": "1",
},
Expand Down
4 changes: 2 additions & 2 deletions pkg/releasing/git.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ def _git_changelog_impl(ctx):
arguments = [args],
outputs = [ctx.outputs.out],
env = {
"LANG": "en_US.UTF-8",
"LC_CTYPE": "UTF-8",
"LANG": ctx.configuration.default_shell_env.get("LANG", "en_US.UTF-8"),
"LC_CTYPE": ctx.configuration.default_shell_env.get("LC_CTYPE", "UTF-8"),
"PYTHONIOENCODING": "UTF-8",
"PYTHONUTF8": "1",
},
Expand Down
4 changes: 2 additions & 2 deletions pkg/rpm_pfg.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -675,8 +675,8 @@ def _pkg_rpm_impl(ctx):
inputs = files,
outputs = [output_file],
env = {
"LANG": "en_US.UTF-8",
"LC_CTYPE": "UTF-8",
"LANG": ctx.configuration.default_shell_env.get("LANG", "en_US.UTF-8"),
"LC_CTYPE": ctx.configuration.default_shell_env.get("LC_CTYPE", "UTF-8"),
"PYTHONIOENCODING": "UTF-8",
"PYTHONUTF8": "1",
},
Expand Down

0 comments on commit 688d7ac

Please sign in to comment.