Fetching: git on Mac OS (#24247)

Extend the changes in #24163 to unit tests.
This commit is contained in:
Peter Scheibel
2021-06-21 17:53:12 -07:00
committed by GitHub
parent 7b6ca59038
commit c83f4b01aa
4 changed files with 17 additions and 6 deletions

View File

@@ -259,7 +259,8 @@ class Git(AutotoolsPackage):
@classmethod
def determine_version(cls, exe):
output = Executable(exe)('--version', output=str, error=str)
match = re.search(r'git version (\S+)', output)
match = re.search(
spack.fetch_strategy.GitFetchStrategy.git_version_re, output)
return match.group(1) if match else None
@classmethod