aboutsummaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2025-04-03 14:35:27 +0200
committerDmitry Vyukov <dvyukov@google.com>2025-04-03 13:17:55 +0000
commitd7ae3a111bd75df44dda69b37da945b50d5133e2 (patch)
tree9797c351f3f4d30ae71068ae1447b457506afb7c /sys
parent012c639d904cf60a221b8b16833c02eed9b2514e (diff)
pkg/ifuzz: fix generate/build
Currently the commands we have in go:generate first create an empty file and then write final contents. This breaks any parallel builds of the source. Even running go generate ./... does not work. Write output files atomically.
Diffstat (limited to 'sys')
-rw-r--r--sys/fuchsia/fidlgen/main.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/fuchsia/fidlgen/main.go b/sys/fuchsia/fidlgen/main.go
index ab2bcf0cd..315d6a466 100644
--- a/sys/fuchsia/fidlgen/main.go
+++ b/sys/fuchsia/fidlgen/main.go
@@ -91,7 +91,7 @@ func main() {
return pos.File == file
}))
- if err := osutil.WriteFile(file, desc); err != nil {
+ if err := osutil.WriteFileAtomically(file, desc); err != nil {
tool.Fail(err)
}
}