diff --git a/main.go b/main.go index d28127c..b8819eb 100644 --- a/main.go +++ b/main.go @@ -241,7 +241,12 @@ func renderLogAndGetVersion(newVersion *semVer, logs []commit) (*semVer, error) } // Read back version from changelog file - changelog := strings.Split(string(c), "\n") + newLog, err := readChangelog() + if err != nil { + return nil, fmt.Errorf("reading back changelog after edit: %w", err) + } + + changelog := strings.Split(newLog, "\n") if len(changelog) < 1 { return nil, errors.New("changelog is empty, no way to read back the version") }