diff --git a/pkg/cmd/run.go b/pkg/cmd/run.go index 589565ce7c..c6487a0d12 100644 --- a/pkg/cmd/run.go +++ b/pkg/cmd/run.go @@ -851,7 +851,7 @@ func (o *runCmdOptions) applyDependencies(cmd *cobra.Command, c client.Client, i func (o *runCmdOptions) getPlatform(cmd *cobra.Command, c client.Client, it *v1.Integration) (*v1.IntegrationPlatform, error) { // let's also enable the registry trait if not explicitly disabled - if !contains(o.Traits, "registry.enabled=false") { + if !util.StringSliceContainsAnyOf(o.Traits, "registry.enabled=false") { o.Traits = append(o.Traits, "registry.enabled=true") } pl, err := platform.GetOrFindForResource(o.Context, c, it, true) @@ -1370,13 +1370,3 @@ func getDirName(path string) (string, error) { } return parentDir, nil } - -func contains(s []string, str string) bool { - for _, v := range s { - if v == str { - return true - } - } - - return false -}