mirror of
https://github.com/Cian-H/I-Form_Server_Node_Deployer.git
synced 2025-12-23 14:42:02 +00:00
18 lines
410 B
Python
18 lines
410 B
Python
import typer # type: ignore
|
|
import inspect
|
|
|
|
|
|
def debug_mode(debug: bool = False):
|
|
if not debug:
|
|
return
|
|
try:
|
|
import snoop # type: ignore
|
|
except ImportError:
|
|
typer.echo("Debug mode requires the snoop package")
|
|
raise typer.Exit(1)
|
|
else:
|
|
snoop.install(
|
|
snoop="ss",
|
|
)
|
|
typer.echo(f"Debug mode enabled: {inspect.stack()[1].filename}")
|