fix occasionally-jumbled output
Alan Pearce alan@alanpearce.eu
Wed, 05 Jun 2024 11:05:37 +0200
1 files changed, 1 insertions(+), 1 deletions(-)
jump to
M internal/builder/builder.go → internal/builder/builder.go
@@ -30,7 +30,7 @@ } 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") }