Skip to content

Commit

Permalink
fix: handle error on update
Browse files Browse the repository at this point in the history
  • Loading branch information
exu committed Jul 3, 2024
1 parent 8240df0 commit dbcb556
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/kubectl-testkube/commands/testworkflows/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ func NewCreateTestWorkflowCmd() *cobra.Command {

workflow, err := client.GetTestWorkflow(obj.Name)
if err != nil {
ui.Debug("getting test workflow: " + err.Error())
if update {
ui.ExitOnError("getting test workflow "+obj.Name+" in namespace "+obj.Namespace, err)
} else {
ui.Debug("getting test workflow "+obj.Name+" in namespace "+obj.Namespace, err.Error())
}
}

if workflow.Name != "" {
Expand Down

0 comments on commit dbcb556

Please sign in to comment.