Skip to content

Commit

Permalink
[wpt] Discard stderr when calling git
Browse files Browse the repository at this point in the history
git occasionally prints warning messages to stderr (e.g. when too many
files are modified and rename detection is disabled), which would mess
with the output parsing if they are redirected to stdout.

Fixes web-platform-tests#18608.
  • Loading branch information
Hexcles committed Sep 6, 2019
1 parent 24b6c5f commit 30c42ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/wpt/testfiles.py
Expand Up @@ -51,7 +51,7 @@ def git(cmd, *args):
full_cmd = [u"git", cmd] + list(item.decode("utf8") if isinstance(item, bytes) else item for item in args) # type: List[Text]
try:
logger.debug(" ".join(full_cmd))
return subprocess.check_output(full_cmd, cwd=repo_path, stderr=subprocess.STDOUT).decode("utf8").strip()
return subprocess.check_output(full_cmd, cwd=repo_path).decode("utf8").strip()
except subprocess.CalledProcessError as e:
logger.error("Git command exited with status %i" % e.returncode)
logger.error(e.output)
Expand Down

0 comments on commit 30c42ec

Please sign in to comment.