diff options
author | Christian Muehlhaeuser <muesli@gmail.com> | 2019-07-19 03:55:33 +0200 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2019-07-27 10:53:19 +1000 |
commit | 69ac0036e67ac22fdf3baaa083a9020d001180d6 (patch) | |
tree | e36d5f07a8d82a40693772fcbb6717700361e52e | |
parent | 975a5315b036b84e0d8befd7ca5e7dbc062caf84 (diff) |
Swallow errors entirely, instead of assigning and ignoring them
-rw-r--r-- | pkg/git/commit_list_builder.go | 6 | ||||
-rwxr-xr-x | 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, ".") |