added --debug flag

This commit is contained in:
Fredrick W. Warren 2025-02-26 13:36:24 -07:00
parent 153665883f
commit 1419cf5dc2
2 changed files with 17 additions and 0 deletions

View File

@ -247,6 +247,8 @@ def main(config, debug):
The main entry point of the application.
Parameters:
config (str): path to config file
debug (bool): is debug output enabled
"""
if not debug:
ic.disable()

15
test.py Executable file
View File

@ -0,0 +1,15 @@
#!./venv/bin/python3
import click
import os
#@click.option('--config', '-c', default=config_file, help='Path to the configuration file.')
@click.command()
@click.option('--debug/-d', envvar='DEVELOPMENTS', default='false', help='enable dubug output')
def main(debug):
print(debug)
if __name__ == '__main__':
main()