git » git-arr » commit c27ba7c

serve: Enable Bottle debug mode if $GIT_ARR_DEBUG is set

author Alberto Bertogli
2025-07-18 17:17:08 UTC
committer Alberto Bertogli
2025-07-18 17:17:08 UTC
parent cba2f26ae63246ab11ba73215403248731c3b618

serve: Enable Bottle debug mode if $GIT_ARR_DEBUG is set

This patch enables Bottle debug mode when serving, if the $GIT_ARR_DEBUG
environment variable is set.

This can be useful during development and debugging.

git-arr +2 -0

diff --git a/git-arr b/git-arr
index a145d6b..f8ea145 100755
--- a/git-arr
+++ b/git-arr
@@ -573,6 +573,8 @@ def main():
         parser.error("Must specify an action (serve|generate)")
 
     if args[0] == "serve":
+        if os.environ.get("GIT_ARR_DEBUG"):
+            bottle.debug(True)
         bottle.run(host="localhost", port=8008, reloader=True)
     elif args[0] == "generate":
         if not opts.output: