summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2019-02-27 14:01:50 -0600
committerPeter Scheibel <scheibel1@llnl.gov>2019-02-27 14:01:50 -0600
commita25edb51a9d1aea3c54b412ccc55ac96e36ed932 (patch)
tree9f1686de7f9cebf65e6e7eb683a0a15e5b4d7096 /lib
parent2f4f828b457147a16685580e0c245adcb5eda7e8 (diff)
downloadspack-a25edb51a9d1aea3c54b412ccc55ac96e36ed932.tar.gz
spack-a25edb51a9d1aea3c54b412ccc55ac96e36ed932.tar.bz2
spack-a25edb51a9d1aea3c54b412ccc55ac96e36ed932.tar.xz
spack-a25edb51a9d1aea3c54b412ccc55ac96e36ed932.zip
Fix 'make test' detection when LANG is not in English (#10499)
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/package.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py
index 37c12b0bd5..9c1ba04207 100644
--- a/lib/spack/spack/package.py
+++ b/lib/spack/spack/package.py
@@ -1139,7 +1139,11 @@ class PackageBase(with_metaclass(PackageMeta, PackageViewMixin, object)):
Returns:
bool: True if 'target' is found, else False
"""
- make = inspect.getmodule(self).make
+ # Prevent altering LC_ALL for 'make' outside this function
+ make = copy.deepcopy(inspect.getmodule(self).make)
+
+ # Use English locale for missing target message comparison
+ make.add_default_env('LC_ALL', 'C')
# Check if we have a Makefile
for makefile in ['GNUmakefile', 'Makefile', 'makefile']: