Skip to content

Commit

Permalink
fix: support for every type of error in run loop
Browse files Browse the repository at this point in the history
  • Loading branch information
lindell committed Jul 2, 2020
1 parent 544c350 commit c3f686e
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions internal/multigitter/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,10 @@ func (r Runner) Run(ctx context.Context) error {
for _, repo := range repos {
logger := log.WithField("repo", repo.FullName())
err := r.runSingleRepo(ctx, repo)
if exitErr, ok := err.(*exec.ExitError); ok {
logger.Infof("Got exit code %d", exitErr.ExitCode())
rc.addError(exitErr, repo)
continue
} else if err == domain.NoChangeError ||
err == domain.BranchExistError {
if err != nil {
logger.Info(err)
rc.addError(err, repo)
continue
} else if err != nil {
return err
}

rc.successRepos = append(rc.successRepos, repo)
Expand Down

0 comments on commit c3f686e

Please sign in to comment.