about summary refs log tree commit diff stats
path: root/internal
diff options
context:
space:
mode:
authorAlan Pearce2024-06-05 11:05:37 +0200
committerAlan Pearce2024-06-05 11:05:37 +0200
commit779bfc1e56eec9f70bba21aff3ea490856d90876 (patch)
tree81004d89835e1b7a18ae8bc7655751691089aa0e /internal
parent1effea664c1a9fa9881fa9832d4cfeeac23c1158 (diff)
downloadwebsite-779bfc1e56eec9f70bba21aff3ea490856d90876.tar.lz
website-779bfc1e56eec9f70bba21aff3ea490856d90876.tar.zst
website-779bfc1e56eec9f70bba21aff3ea490856d90876.zip
fix occasionally-jumbled output
Diffstat (limited to 'internal')
-rw-r--r--internal/builder/builder.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/builder/builder.go b/internal/builder/builder.go
index 7c69af0..0a774fb 100644
--- a/internal/builder/builder.go
+++ b/internal/builder/builder.go
@@ -30,7 +30,7 @@ func mkdirp(dirs ...string) error {
 
 func outputToFile(output io.Reader, filename ...string) error {
 	log.Debug("outputting file", "filename", path.Join(filename...))
-	file, err := os.OpenFile(path.Join(filename...), os.O_WRONLY|os.O_CREATE, 0644)
+	file, err := os.OpenFile(path.Join(filename...), os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0644)
 	if err != nil {
 		return errors.WithMessage(err, "could not open output file")
 	}