Skip to content

Commit

Permalink
allow results and log writing to overwrite existing content on re-run…
Browse files Browse the repository at this point in the history
… of preflight

Signed-off-by: Jose R. Gonzalez <jose@flutes.dev>
  • Loading branch information
komish committed Jan 10, 2023
1 parent 896cbda commit 9a5c4a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion artifacts/filesystem_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ type FilesystemWriterOption = func(*FilesystemWriter)
func (w *FilesystemWriter) WriteFile(filename string, contents io.Reader) (string, error) {
fullFilePath := filepath.Join(w.Path(), filename)

if err := afero.SafeWriteReader(w.fs, fullFilePath, contents); err != nil {
if err := afero.WriteReader(w.fs, fullFilePath, contents); err != nil {
return fullFilePath, fmt.Errorf("could not write file to artifacts directory: %v", err)
}
return fullFilePath, nil
Expand Down

0 comments on commit 9a5c4a0

Please sign in to comment.