From 43ecf35449d4a1dd2dd8080d571d31fc85f96762 Mon Sep 17 00:00:00 2001 From: Richard M Date: Fri, 14 Jul 2023 20:47:11 +0100 Subject: [PATCH] Change CommonOptions (deprecated) to ClientOptions and remove unneeded parameters. --- pkg/context/context.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pkg/context/context.go b/pkg/context/context.go index 75417aee..9842f23c 100644 --- a/pkg/context/context.go +++ b/pkg/context/context.go @@ -8,22 +8,19 @@ import ( "github.com/docker/cli/cli/context" contextStore "github.com/docker/cli/cli/context/store" cliflags "github.com/docker/cli/cli/flags" - "github.com/moby/term" ) func NewDefaultDockerContextStore() *command.ContextStoreWithDefault { - _, _, stderr := term.StdStreams() - dockerConfig := dConfig.LoadDefaultConfigFile(stderr) contextDir := dConfig.ContextStoreDir() storeConfig := command.DefaultContextStoreConfig() store := newContextStore(contextDir, storeConfig) - opts := &cliflags.CommonOptions{Context: "default"} + opts := &cliflags.ClientOptions{Context: "default"} dockerContextStore := &command.ContextStoreWithDefault{ Store: store, Resolver: func() (*command.DefaultContext, error) { - return command.ResolveDefaultContext(opts, dockerConfig, storeConfig, stderr) + return command.ResolveDefaultContext(opts, storeConfig) }, }