Skip to content

Commit

Permalink
qa: return exit code 1 if fontbakery reports a fatal error
Browse files Browse the repository at this point in the history
  • Loading branch information
m4rc1e committed Dec 14, 2023
1 parent c4eaefa commit f09d250
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Lib/gftools/qa.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from gftools.gfgithub import GitHubClient
from gftools.utils import mkdir
import sys

try:
from diffenator2 import ninja_diff, ninja_proof
Expand Down Expand Up @@ -114,12 +115,16 @@ def fontbakery(self, profile="googlefonts", html=False, extra_args=None):
+ [f.path for f in self.fonts]
+ ["-C"]
+ ["--ghmarkdown", os.path.join(out, "report.md")]
+ ["-e", "FATAL"]
)
if html:
cmd.extend(["--html", os.path.join(out, "report.html")])
if extra_args:
cmd.extend(extra_args)
subprocess.call(cmd)
process = subprocess.run(cmd)
if process.returncode != 0:
logger.fatal("Fontbakery has raised a fatal error. Please fix!")
sys.exit(1)

fontbakery_report = os.path.join(self.out, "Fontbakery", "report.md")
if not os.path.isfile(fontbakery_report):
Expand Down

0 comments on commit f09d250

Please # to comment.