Fix git_version on macOS (#24163)
This commit is contained in:
@@ -780,8 +780,9 @@ def __init__(self, **kwargs):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def git_version(self):
|
def git_version(self):
|
||||||
vstring = self.git('--version', output=str).lstrip('git version ')
|
output = self.git('--version', output=str, error=str)
|
||||||
return Version(vstring)
|
match = re.search(r'git version (\S+)', output)
|
||||||
|
return Version(match.group(1)) if match else None
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def git(self):
|
def git(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user