about summary refs log tree commit diff stats
path: root/internal/builder/builder.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/builder/builder.go')
-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")
 	}