From 1e05c6a300437371880c1f8a6f0a7dd003da4d5f Mon Sep 17 00:00:00 2001 From: Tim Burks Date: Fri, 13 Oct 2023 14:03:13 -0700 Subject: [PATCH] connection.ActiveConfig() should use config.Active() instead of reading configuration directly --- pkg/connection/config.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pkg/connection/config.go b/pkg/connection/config.go index 24c8abd5f..7f77b742f 100644 --- a/pkg/connection/config.go +++ b/pkg/connection/config.go @@ -46,12 +46,17 @@ func ActiveConfig() (Config, error) { return *active, nil } - name, err := config.ActiveName() + c, err := config.Active() if err != nil { return Config{}, err } - - return ReadConfig(name) + return Config{ + Address: c.Registry.Address, + Insecure: c.Registry.Insecure, + Location: c.Registry.Location, + Project: c.Registry.Project, + Token: c.Registry.Token, + }, nil } // Reads a Config from a file. If name is empty, no