We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9419e74 commit cfe9fbdCopy full SHA for cfe9fbd
cmd/semantic-release/main.go
@@ -211,11 +211,9 @@ func cliHandler(cmd *cobra.Command, args []string) {
211
if conf.Changelog != "" {
212
oldFile := make([]byte, 0)
213
if conf.PrependChangelog {
214
- oldFile, err = ioutil.ReadFile(conf.Changelog)
+ oldFileData, err := ioutil.ReadFile(conf.Changelog)
215
if err == nil {
216
- oldFile = append([]byte("\n\n"), oldFile...)
217
- } else {
218
- oldFile = make([]byte, 0)
+ oldFile = append([]byte("\n"), oldFileData...)
219
}
220
221
changelogData := append([]byte(changelogRes), oldFile...)
0 commit comments