Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qa: carry on runnning all tools if an error occurs #1063

Merged
merged 1 commit into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Lib/gftools/qa.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def __init__(self, fonts, fonts_before=None, out="out", url=None):
self.fonts_before = fonts_before
self.out = out
self.url = url
self.has_error = False

@report_exceptions
def diffenator(self, **kwargs):
Expand Down Expand Up @@ -134,8 +135,7 @@ def fontbakery(self, profile="googlefonts", html=False, extra_args=None):
self.post_to_github(msg)

if process.returncode != 0:
logger.fatal("Fontbakery has raised a fatal error. Please fix!")
sys.exit(1)
self.has_error = True

def googlefonts_upgrade(self, imgs=False):
self.fontbakery()
Expand Down
5 changes: 5 additions & 0 deletions Lib/gftools/scripts/qa.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from fontTools.ttLib import TTFont
import argparse
import os
import sys
import shutil
import logging
from gftools.utils import (
Expand Down Expand Up @@ -268,6 +269,10 @@ def main(args=None):
if args.interpolations:
qa.interpolations()

if qa.has_error:
logger.fatal("Fontbakery has raised a fatal error. Please fix!")
sys.exit(1)


if __name__ == "__main__":
main()