From 776734a254d9f69b751f35ca8e775398d2953b24 Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Thu, 19 Dec 2024 07:27:45 -0800 Subject: [PATCH] fix: honor shell env on tar extract Allows users to override the locale, needed for tarballs with filenames not supported by the system locale --- npm/private/npm_package_store.bzl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/npm/private/npm_package_store.bzl b/npm/private/npm_package_store.bzl index 2e4571668..3a02f46d8 100644 --- a/npm/private/npm_package_store.bzl +++ b/npm/private/npm_package_store.bzl @@ -240,6 +240,10 @@ def _npm_package_store_impl(ctx): ], mnemonic = "NpmPackageExtract", progress_message = "Extracting npm package {}@{}".format(package, version), + # Allow users to set --action_env=LC_ALL=C.UTF-8 for example, + # on systems where default locale is wrong. + # See https://github.com/aspect-build/rules_js/issues/2039 + use_default_shell_env = True, ) else: copy_directory_bin_action(