builder: add missing error check for ioutil.TempFile()

Этот коммит содержится в:
Damian Gryski 2021-09-07 20:29:34 -07:00 коммит произвёл Ron Evans
родитель 602d3d7c78
коммит 485a9284e7

Просмотреть файл

@ -155,6 +155,10 @@ func compileAndCacheCFile(abspath, tmpdir string, cflags []string, printCommands
// Write dependencies file.
f, err := ioutil.TempFile(filepath.Dir(depfileCachePath), depfileName)
if err != nil {
return "", err
}
buf, err = json.MarshalIndent(dependencySlice, "", "\t")
if err != nil {
panic(err) // shouldn't happen