Only print the raw builds.sr.ht response with -o debug

Fixes e42fe33f2f,
with which all pushes to printed this:
https://twitter.com/nabijaczleweli/status/1290769322911113218
This commit is contained in:
наб 2020-08-05 00:08:55 +02:00 committed by Drew DeVault
parent e42fe33f2f
commit 8f88443fd9
1 changed files with 3 additions and 1 deletions

View File

@ -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)