From 779bfc1e56eec9f70bba21aff3ea490856d90876 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 5 Jun 2024 11:05:37 +0200 Subject: fix occasionally-jumbled output --- internal/builder/builder.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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") } -- cgit 1.4.1