Skip to content

Commit

Permalink
resolved issue #128
Browse files Browse the repository at this point in the history
  • Loading branch information
daveshanley committed Apr 25, 2024
1 parent a58b58a commit 05e5148
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 3 additions & 1 deletion cmd/report.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,9 @@ func GetReportCommand() *cobra.Command {
<-doneChan
if len(errs) > 0 {
for e := range errs {
pterm.Error.Println(errs[e].Error())
if errs[e] != nil {
pterm.Error.Println(errs[e].Error())
}
}
return errors.New("unable to process specifications")
}
Expand Down
7 changes: 6 additions & 1 deletion cmd/summary.go
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,12 @@ func runLeftRightSummary(left, right string, updateChan chan *model.ProgressUpda
},
}

commits, _ = git.BuildCommitChangelog(commits, updateChan, errorChan, base, remote)
var errs []error
commits, errs = git.BuildCommitChangelog(commits, updateChan, errorChan, base, remote)
if len(errs) > 0 {
close(updateChan)
return errs
}

if len(commits) <= 0 {
close(updateChan)
Expand Down
2 changes: 1 addition & 1 deletion git/read_local.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ func BuildCommitChangelog(commitHistory []*model.Commit,

if errs != nil {
model.SendProgressError("building models", fmt.Sprintf("Error thrown when comparing: %s", errs[0].Error()), errorChan)
changeErrors = append(changeErrors, err)
changeErrors = append(changeErrors, errs...)
}
commitHistory[c].Changes = changes
} else {
Expand Down

0 comments on commit 05e5148

Please sign in to comment.