bootstrapBuildTools()
// Remember old content of $GOROOT/bin for comparison below.
- oldBinFiles, _ := filepath.Glob(pathf("%s/bin/*", goroot))
+ oldBinFiles, err := filepath.Glob(pathf("%s/bin/*", goroot))
+ if err != nil {
+ fatalf("glob: %v", err)
+ }
// For the main bootstrap, building for host os/arch.
oldgoos = goos
// Check that there are no new files in $GOROOT/bin other than
// go and gofmt and $GOOS_$GOARCH (target bin when cross-compiling).
- binFiles, _ := filepath.Glob(pathf("%s/bin/*", goroot))
+ binFiles, err := filepath.Glob(pathf("%s/bin/*", goroot))
+ if err != nil {
+ fatalf("glob: %v", err)
+ }
+
ok := map[string]bool{}
for _, f := range oldBinFiles {
ok[f] = true