Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
133839: release: update versions should properly handle errors r=jlinder a=rail

Previously, the update versions script was wrongly using the `err` variable to set the status of a command execution results.

This PR fixes the issue, where a command fails, but the script ignores the error.

Epic: none
Release note: None

Co-authored-by: Rail Aliiev <[email protected]>
  • Loading branch information
craig[bot] and rail committed Oct 30, 2024
2 parents b451d8f + c97076f commit 7433edc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/cmd/release/update_versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,8 @@ func updateVersions(_ *cobra.Command, _ []string) error {
var prs []string
var workOnRepoErrors []error
for _, repo := range reposToWorkOn {
repo.workOnRepoError = workOnRepo(repo)
err := workOnRepo(repo)
repo.workOnRepoError = err
if repo.workOnRepoError != nil {
err = fmt.Errorf("workOnRepo: error occurred while working on repo %s: %w", repo.name(), err)
workOnRepoErrors = append(workOnRepoErrors, err)
Expand Down

0 comments on commit 7433edc

Please sign in to comment.