summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralalazo <massimiliano.culpo@googlemail.com>2016-07-26 09:03:17 +0200
committeralalazo <massimiliano.culpo@googlemail.com>2016-07-26 09:03:17 +0200
commit9c7b98dcc80d3bb3b5a09d06ec81da12b8761fb2 (patch)
tree603cd8454a2d183216ce957ef63178c68486a35f
parentc6a05f4a7d316a1b4590654fd4e64475cb54f194 (diff)
downloadspack-9c7b98dcc80d3bb3b5a09d06ec81da12b8761fb2.tar.gz
spack-9c7b98dcc80d3bb3b5a09d06ec81da12b8761fb2.tar.bz2
spack-9c7b98dcc80d3bb3b5a09d06ec81da12b8761fb2.tar.xz
spack-9c7b98dcc80d3bb3b5a09d06ec81da12b8761fb2.zip
modules : handle dashes in environment variables
-rw-r--r--lib/spack/spack/modules.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py
index 7d35839570..8701a31c49 100644
--- a/lib/spack/spack/modules.py
+++ b/lib/spack/spack/modules.py
@@ -287,7 +287,7 @@ class EnvModule(object):
def upper_tokens(self):
"""Tokens that can be substituted in environment variable names"""
upper_tokens = {
- 'name': self.spec.name.upper()
+ 'name': self.spec.name.replace('-', '_').upper()
}
return upper_tokens