diff --git a/lib/spack/spack/operating_systems/cnl.py b/lib/spack/spack/operating_systems/cnl.py index 7d21d6ef86..59b6e980a2 100644 --- a/lib/spack/spack/operating_systems/cnl.py +++ b/lib/spack/spack/operating_systems/cnl.py @@ -29,8 +29,8 @@ def __str__(self): return self.name + str(self.version) def _detect_crayos_version(self): - output = module("avail", "PrgEnv-") - matches = re.findall(r'PrgEnv-\w+/(\d+).\d+.\d+', output) + output = module("avail", "PrgEnv-cray") + matches = re.findall(r'PrgEnv-cray/(\d+).\d+.\d+', output) major_versions = set(matches) latest_version = max(major_versions) return latest_version