From 4d79f9c612817cec80c2ab4dce3d8bd178820670 Mon Sep 17 00:00:00 2001 From: Cristian Le Date: Wed, 9 Aug 2023 16:44:42 +0200 Subject: [PATCH] Temporary fix for cli entry_point + test_suite Signed-off-by: Cristian Le --- fmf/cli.py | 9 +++++++++ pyproject.toml | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/fmf/cli.py b/fmf/cli.py index 7fd1804d..f5dfbf60 100644 --- a/fmf/cli.py +++ b/fmf/cli.py @@ -209,3 +209,12 @@ def main(arguments=None, path=None): """ Parse options, do what is requested """ parser = Parser(arguments, path) return parser.output + + +def cli_entry(): + try: + main() + except fmf.utils.GeneralError as error: + if "--debug" not in sys.argv: + fmf.utils.log.error(error) + raise diff --git a/pyproject.toml b/pyproject.toml index d290faa2..890a02ff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ all = [ ] [project.scripts] -fmf = 'fmf.cli:main' +fmf = 'fmf.cli:cli_entry' [tool.hatch] version.source = 'vcs'