Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/orb.go
Original file line number Diff line number Diff line change
Expand Up @@ -1405,7 +1405,7 @@ func initOrb(opts orbOptions) error {
contextAPI := context.NewContextClient(opts.cfg, "", vcsProvider, ownerName)
err = contextAPI.CreateContext("orb-publishing")
if err != nil {
if strings.Contains(err.Error(), "A context named orb-publishing already exists") {
if strings.Contains(strings.ToLower(err.Error()), "already exists") {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you might need another case here in order to match the error returned by the graphql endpoint? The example you provided has an underscore in that string: "Error creating context: ALREADY_EXISTS"

fmt.Println("`orb-publishing` context already exists, continuing on")
} else {
return err
Expand Down