From 6d882a51e0e42fb991ddc12375b58c3b38e6c865 Mon Sep 17 00:00:00 2001 From: uji <49834542+uji@users.noreply.github.com> Date: Tue, 30 Aug 2022 21:40:15 +0900 Subject: [PATCH] build: fix ignored errors (#25591) --- build/ci.go | 5 ++++- build/update-license.go | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/build/ci.go b/build/ci.go index 80b040045..24f225b72 100644 --- a/build/ci.go +++ b/build/ci.go @@ -982,7 +982,10 @@ func doWindowsInstaller(cmdline []string) { if env.Commit != "" { version[2] += "-" + env.Commit[:8] } - installer, _ := filepath.Abs("geth-" + archiveBasename(*arch, params.ArchiveVersion(env.Commit)) + ".exe") + installer, err := filepath.Abs("geth-" + archiveBasename(*arch, params.ArchiveVersion(env.Commit)) + ".exe") + if err != nil { + log.Fatalf("Failed to convert installer file path: %v", err) + } build.MustRunCommand("makensis.exe", "/DOUTPUTFILE="+installer, "/DMAJORVERSION="+version[0], diff --git a/build/update-license.go b/build/update-license.go index 5bad996cc..f61536470 100644 --- a/build/update-license.go +++ b/build/update-license.go @@ -342,7 +342,10 @@ func isGenerated(file string) bool { } defer fd.Close() buf := make([]byte, 2048) - n, _ := fd.Read(buf) + n, err := fd.Read(buf) + if err != nil { + return false + } buf = buf[:n] for _, l := range bytes.Split(buf, []byte("\n")) { if bytes.HasPrefix(l, []byte("// Code generated")) {