Skip to content
This repository has been archived by the owner on Oct 30, 2024. It is now read-only.

Commit

Permalink
writes only to file and truncate it, so overwrite works as expected (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
dani-santos-code authored Oct 1, 2020
1 parent f99985c commit c158e46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/commands/autofix.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func autofix(cmd *cobra.Command, args []string) {
log.WithError(err).Fatal("Error opening out file")
}
} else {
f, err = os.OpenFile(rootConfig.manifest, os.O_RDWR, 0755)
f, err = os.OpenFile(rootConfig.manifest, os.O_WRONLY|os.O_TRUNC, 0755)
if err != nil {
log.WithError(err).Fatal("Error opening manifest file")
}
Expand Down

0 comments on commit c158e46

Please sign in to comment.