Fix non-constant log strings

Newer versions of the go compiler (1.24 in this case) fail when running
go test during a mock rebuild of the srpm created by 'make srpm' on
Fedora 42.

Even though we currently don't support go1.24, fix these so they don't
become an issue when we do.
This commit is contained in:
Brian C. Lane 2025-01-16 11:36:04 -08:00 committed by Brian C. Lane
parent af0543d27c
commit 73101d2ff2
3 changed files with 3 additions and 3 deletions

View file

@ -131,7 +131,7 @@ func main() {
listeners, err := activation.ListenersWithNames()
if err != nil {
logrus.Fatalf("Could not get listening sockets: " + err.Error())
logrus.Fatalf("Could not get listening sockets: %v", err)
}
if l, exists := listeners["osbuild-composer.socket"]; exists {

View file

@ -94,7 +94,7 @@ func runOsbuild(logger *logrus.Logger, buildDir string, control *controlJSON, ou
out, err := cmd.CombinedOutput()
if err != nil {
err = fmt.Errorf("cannot tar output directory: %w, output:\n%s", err, out)
logger.Errorf(err.Error())
logger.Errorf("%v", err)
_, _ = mw.Write([]byte(err.Error()))
return "", err
}

View file

@ -26,7 +26,7 @@ func BuildJWTAuthHandler(keysURLs []string, caFile, aclFile string, exclude []st
return
}
logger.Info(context.Background(), aclFile)
logger.Info(context.Background(), "aclFile = %s", aclFile)
builder := authentication.NewHandler().
Logger(logger)