fix gpg version parsing for macos (#41995)

This commit is contained in:
Greg Becker
2024-01-09 11:40:06 -08:00
committed by GitHub
parent bf39900390
commit ba547a7f51

View File

@@ -334,7 +334,7 @@ def _verify_exe_or_raise(exe):
raise SpackGPGError(msg)
output = exe("--version", output=str)
match = re.search(r"^gpg(conf)? \(GnuPG\) (.*)$", output, re.M)
match = re.search(r"^gpg(conf)? \(GnuPG(?:/MacGPG2)?\) (.*)$", output, re.M)
if not match:
raise SpackGPGError('Could not determine "{0}" version'.format(exe.name))