build: fix ignored errors (#25591)

This commit is contained in:
uji 2022-08-30 21:40:15 +09:00 committed by GitHub
parent 6e6b5087f1
commit 6d882a51e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

@ -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],

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