|
58 | 58 | -F, --fail-on-ignored Return an error code if we skipped a fail. |
59 | 59 | Used in conjunction with -D and `dont_stop` |
60 | 60 | options |
| 61 | + --fail-on-warnings Return an error code if we informed warnings. |
61 | 62 | -g DEF, --global-redef DEF Overwrite a global value (VAR=VAL) |
62 | 63 | --gui Open a graphic dialog |
63 | 64 | --internal-check Run some outputs internal checks |
|
153 | 154 | from .gs import GS |
154 | 155 | from . import dep_downloader |
155 | 156 | from .misc import (EXIT_BAD_ARGS, W_VARCFG, NO_PCBNEW_MODULE, W_NOKIVER, hide_stderr, TRY_INSTALL_CHECK, W_ONWIN, |
156 | | - FAILED_EXECUTE, W_ONMAC, IGNORED_ERRORS) |
| 157 | + FAILED_EXECUTE, W_ONMAC, IGNORED_ERRORS, GOT_WARNINGS) |
157 | 158 | from .pre_base import BasePreFlight |
158 | 159 | from .config_reader import (print_outputs_help, print_output_help, print_preflights_help, create_example, print_filters_help, |
159 | 160 | print_global_options_help, print_dependencies, print_variants_help, print_errors, |
@@ -668,6 +669,9 @@ def main(): |
668 | 669 | if args.fail_on_ignored and (GS.errors_ignored or log.errors_ignored): |
669 | 670 | exit(IGNORED_ERRORS) |
670 | 671 |
|
| 672 | + if args.fail_on_warnings and logger.got_warnings(): |
| 673 | + exit(GOT_WARNINGS) |
| 674 | + |
671 | 675 |
|
672 | 676 | if __name__ == "__main__": |
673 | 677 | main() # pragma: no cover |
0 commit comments