From 69ac0036e67ac22fdf3baaa083a9020d001180d6 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Fri, 19 Jul 2019 03:55:33 +0200 Subject: [PATCH] Swallow errors entirely, instead of assigning and ignoring them --- pkg/git/commit_list_builder.go | 6 ++---- scripts/push_new_patch/main.go | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/pkg/git/commit_list_builder.go b/pkg/git/commit_list_builder.go index 60ac22f4a..a47fcbfe2 100644 --- a/pkg/git/commit_list_builder.go +++ b/pkg/git/commit_list_builder.go @@ -261,10 +261,8 @@ func (c *CommitListBuilder) getMergeBase() (string, error) { baseBranch = "develop" } - output, err := c.OSCommand.RunCommandWithOutput(fmt.Sprintf("git merge-base HEAD %s", baseBranch)) - if err != nil { - // swallowing error because it's not a big deal; probably because there are no commits yet - } + // swallowing error because it's not a big deal; probably because there are no commits yet + output, _ := c.OSCommand.RunCommandWithOutput(fmt.Sprintf("git merge-base HEAD %s", baseBranch)) return output, nil } diff --git a/scripts/push_new_patch/main.go b/scripts/push_new_patch/main.go index b1660d3c1..01b844c8d 100755 --- a/scripts/push_new_patch/main.go +++ b/scripts/push_new_patch/main.go @@ -29,7 +29,7 @@ func main() { splitVersion := strings.Split(stringVersion, ".") patch := splitVersion[len(splitVersion)-1] - newPatch, err := strconv.Atoi(patch) + newPatch, _ := strconv.Atoi(patch) splitVersion[len(splitVersion)-1] = strconv.FormatInt(int64(newPatch)+1, 10) newVersion := strings.Join(splitVersion, ".")