From d1b39c8d06c70101ca705fc5d4450b7560121e92 Mon Sep 17 00:00:00 2001 From: mik-dass Date: Fri, 29 Jan 2021 17:55:12 +0530 Subject: [PATCH] Fixes occlient error while creating new URL client --- pkg/odo/cli/url/list.go | 2 +- pkg/odo/genericclioptions/context.go | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/pkg/odo/cli/url/list.go b/pkg/odo/cli/url/list.go index 77d8020940c..d0b94c8e381 100644 --- a/pkg/odo/cli/url/list.go +++ b/pkg/odo/cli/url/list.go @@ -60,7 +60,7 @@ func (o *ListOptions) Complete(name string, cmd *cobra.Command, args []string) ( o.client = url.NewClient(url.ClientOptions{ LocalConfigProvider: o.Context.LocalConfigProvider, - OCClient: *genericclioptions.Client(cmd), + OCClient: *o.Context.Client, IsRouteSupported: routeSupported, }) return diff --git a/pkg/odo/genericclioptions/context.go b/pkg/odo/genericclioptions/context.go index 076bf42a6aa..6b0645c584b 100644 --- a/pkg/odo/genericclioptions/context.go +++ b/pkg/odo/genericclioptions/context.go @@ -93,9 +93,6 @@ func New(parameters CreateParameters, toggles ...bool) (context *Context, err er context.ComponentContext = parameters.ComponentContext } - context = NewContext(parameters.Cmd) - context.ComponentContext = parameters.ComponentContext - err = context.InitConfigFromContext() if err != nil { return nil, err