summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/spack/spack/operating_systems/mac_os.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/spack/spack/operating_systems/mac_os.py b/lib/spack/spack/operating_systems/mac_os.py
index d59e6fce65..0efc298338 100644
--- a/lib/spack/spack/operating_systems/mac_os.py
+++ b/lib/spack/spack/operating_systems/mac_os.py
@@ -55,10 +55,14 @@ class MacOs(OperatingSystem):
'10.14': 'mojave',
'10.15': 'catalina',
'10.16': 'bigsur',
- '11.0': 'bigsur',
+ '11': 'bigsur',
}
- mac_ver = str(macos_version().up_to(2))
+ # Big Sur versions go 11.0, 11.0.1, 11.1 (vs. prior versions that
+ # only used the minor component)
+ part = 1 if macos_version() >= Version('11') else 2
+
+ mac_ver = str(macos_version().up_to(part))
name = mac_releases.get(mac_ver, "macos")
super(MacOs, self).__init__(name, mac_ver)