From ea45c9bf066b5449321a10a519b44a7ac38e9038 Mon Sep 17 00:00:00 2001 From: Eric Park Date: Sat, 27 Jan 2024 14:27:44 -0500 Subject: [PATCH] feat(shippy): add debug mode config option --- shippy/shippy/__main__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/shippy/shippy/__main__.py b/shippy/shippy/__main__.py index a42b9ca9..9ef48af5 100644 --- a/shippy/shippy/__main__.py +++ b/shippy/shippy/__main__.py @@ -373,6 +373,10 @@ def is_build_disabling_enabled(): return False +def check_debug_mode(args): + return args.debug or get_optional_true_config_value("shippy", "debug") + + def main(): # Get commandline arguments args = init_argparse() @@ -383,7 +387,7 @@ def main(): print(__version__) return - if args.debug: + if check_debug_mode(args): print_warning("Debug mode has been turned on!") logger.add(sink="shippy_{time}.log", level="DEBUG", enqueue=True)