Be more verbose when a command fails in the WPT upstream script

This commit is contained in:
Martin Robinson 2023-03-23 13:01:22 +01:00
parent be6e25a1b2
commit e09b05e618

View file

@ -60,9 +60,14 @@ class LocalGitRepo:
env.setdefault("GIT_AUTHOR_NAME", self.sync.github_name)
env.setdefault("GIT_COMMITTER_NAME", self.sync.github_name)
return subprocess.check_output(
command_line, cwd=self.path, env=env, stderr=subprocess.STDOUT
).decode("utf-8")
try:
return subprocess.check_output(
command_line, cwd=self.path, env=env, stderr=subprocess.STDOUT
).decode("utf-8")
except subprocess.CalledProcessError as exception:
logging.warning("Process execution failed with output:\n%s",
exception.output.decode("utf-8"))
raise exception
@dataclasses.dataclass()