From a796bbb549cd9055b0dc8f955c65583b1a5089b1 Mon Sep 17 00:00:00 2001 From: Girish Ramnani Date: Tue, 28 Jul 2020 14:27:00 +0530 Subject: [PATCH] make odo delete work on s2i components in experimental mode --- pkg/odo/cli/url/delete.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/odo/cli/url/delete.go b/pkg/odo/cli/url/delete.go index ee4eb934121..5db4caad0a5 100644 --- a/pkg/odo/cli/url/delete.go +++ b/pkg/odo/cli/url/delete.go @@ -9,6 +9,7 @@ import ( "github.com/openshift/odo/pkg/odo/genericclioptions" "github.com/openshift/odo/pkg/odo/util/completion" "github.com/openshift/odo/pkg/odo/util/experimental" + "github.com/openshift/odo/pkg/util" "github.com/pkg/errors" "github.com/spf13/cobra" ktemplates "k8s.io/kubectl/pkg/util/templates" @@ -40,7 +41,7 @@ func NewURLDeleteOptions() *URLDeleteOptions { // Complete completes URLDeleteOptions after they've been Deleted func (o *URLDeleteOptions) Complete(name string, cmd *cobra.Command, args []string) (err error) { - if experimental.IsExperimentalModeEnabled() { + if experimental.IsExperimentalModeEnabled() && util.CheckPathExists(o.DevfilePath) { o.Context = genericclioptions.NewDevfileContext(cmd) o.urlName = args[0]