From 8f88443fd9f7f5fcde73876f155acacaa3a39ab0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= Date: Wed, 5 Aug 2020 00:08:55 +0200 Subject: [PATCH] Only print the raw builds.sr.ht response with -o debug Fixes e42fe33f2f7748c436f042a9808dea5328114e99, with which all pushes to printed this: https://twitter.com/nabijaczleweli/status/1290769322911113218 --- gitsrht-update-hook/post-update.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gitsrht-update-hook/post-update.go b/gitsrht-update-hook/post-update.go index 11422b7..296cafa 100644 --- a/gitsrht-update-hook/post-update.go +++ b/gitsrht-update-hook/post-update.go @@ -259,7 +259,9 @@ func postUpdate() { logger.Printf("Submitted %d builds for %s", len(results), refname) for _, result := range results { - log.Printf("[debug] builds.sr.ht response: \n%s", result.Response) + if _, ok := options["debug"]; ok { + log.Printf("[debug] builds.sr.ht response: \n%s", result.Response) + } log.Printf("\033[94m%s\033[0m [%s]", result.Url, result.Name) } nbuilds += len(results) -- 2.38.4