Added support for git dependencies with custom branch name.

This commit is contained in:
Sławomir Zborowski
2024-04-27 00:00:53 +02:00
parent af59728145
commit 955149ad6a
2 changed files with 15 additions and 2 deletions

View File

@@ -41,9 +41,16 @@ def system(args, exclude=None, stdin=None):
if err:
err = decode(err)
stripped = [line for line in err.split(os.linesep) if line]
def matches_pattern(line, pattern):
if isinstance(pattern, re.Pattern):
return bool(pattern.match(line))
return line.startswith(pattern)
for pattern in exclude:
stripped = [line for line in stripped
if not line.startswith(pattern)]
if not matches_pattern(line, pattern)]
if stripped:
# Tolerate single line warning(s)
for line in stripped: