Skip to content

Commit f7533fb

Browse files
refactor: use fmt.Errorf
1 parent 5ef7c10 commit f7533fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

condition/travis.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func Travis(token, defaultBranch string, private bool) error {
2323
return errors.New("This test run was triggered by a git tag and therefore a new version won’t be published.")
2424
}
2525
if branch := os.Getenv("TRAVIS_BRANCH"); branch != defaultBranch {
26-
return errors.New(fmt.Sprintf("This test run was triggered on the branch %s, while semantic-release is configured to only publish from %s.", branch, defaultBranch))
26+
return fmt.Errorf("This test run was triggered on the branch %s, while semantic-release is configured to only publish from %s.", branch, defaultBranch)
2727
}
2828
if !strings.HasSuffix(os.Getenv("TRAVIS_JOB_NUMBER"), ".1") {
2929
return errors.New("This test run is not the build leader and therefore a new version won’t be published.")

0 commit comments

Comments
 (0)