From 86c812178e5b121d2fa5792ed046df7e88d13d69 Mon Sep 17 00:00:00 2001 From: "AzureAD\\AniketSaha" Date: Tue, 8 Jul 2025 16:26:17 +0200 Subject: [PATCH] Extra debug info for webhooks --- main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index b09172c..81ed1b2 100644 --- a/main.py +++ b/main.py @@ -31,12 +31,16 @@ async def github_webhook(request: Request): # Call the update script on the HOST using host bash subprocess.run( ["/usr/bin/bash", "-c", "bash /home/hmi/Desktop/HMI/update_hmi.sh"], - check=True + check=True, + capture_output=True, + text=True ) return {"status": "Update triggered"} except subprocess.CalledProcessError as e: + print(f"[WEBHOOK] Update failed:\n{e.stderr}") return {"status": "Update failed", "error": str(e)} + @app.post("/connect_toggle") def connect_toggle():