Skip to content

Commit

Permalink
fix: allow to use create --update like in helm (#5838)
Browse files Browse the repository at this point in the history
* fix: allow to use create --update like in helm

* fix: clean
  • Loading branch information
exu authored Sep 9, 2024
1 parent ea56c53 commit 543c5b0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/kubectl-testkube/commands/testworkflows/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ func NewCreateTestWorkflowCmd() *cobra.Command {
workflow, err := client.GetTestWorkflow(obj.Name)
if err != nil {
if update {
ui.ExitOnError("getting test workflow "+obj.Name+" in namespace "+obj.Namespace, err)
// allow to `create --update` if test workflow does not exist
ui.WarnOnError("getting test workflow "+obj.Name+" in namespace "+obj.Namespace, err)
} else {
ui.Debug("getting test workflow "+obj.Name+" in namespace "+obj.Namespace, err.Error())
}
Expand Down

0 comments on commit 543c5b0

Please sign in to comment.