Fix git_version on macOS (#24163)
This commit is contained in:
parent
9f8e40e95c
commit
7449d6950a
1 changed files with 3 additions and 2 deletions
|
@ -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):
|
||||||
|
|
Loading…
Reference in a new issue