Skip to content

Commit

Permalink
fix: ignore error when binary is already published
Browse files Browse the repository at this point in the history
  • Loading branch information
shyim committed Oct 4, 2024
1 parent 128cc7d commit 2a43e2c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/account/account_producer_extension_upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package account
import (
"fmt"
"path/filepath"
"strings"
"time"

"github.com/spf13/cobra"
Expand Down Expand Up @@ -114,7 +115,10 @@ var accountCompanyProducerExtensionUploadCmd = &cobra.Command{

err = p.UpdateExtensionBinaryFile(cmd.Context(), ext.Id, foundBinary.Id, path)
if err != nil {
return err
if strings.Contains(err.Error(), "BinariesException-40") {
logging.FromContext(cmd.Context()).Infof("Binary version is already published. Skipping upload")
return nil
}
}

logging.FromContext(cmd.Context()).Infof("Submitting code review request")
Expand Down

0 comments on commit 2a43e2c

Please # to comment.