From b50363b5bd6dbeb2e9e8dcb0bc81dff92ca4e4db Mon Sep 17 00:00:00 2001 From: Scott Rigby Date: Tue, 27 May 2025 16:25:47 -0400 Subject: [PATCH] No longer need to return client string Signed-off-by: Scott Rigby --- pkg/registry/client.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/registry/client.go b/pkg/registry/client.go index 4d6098256..5a9058fcf 100644 --- a/pkg/registry/client.go +++ b/pkg/registry/client.go @@ -94,7 +94,7 @@ type ( // ORAS v1 was tolerant of an empty config file // ORAS v2 is not // to workaround this regression, ensure configfile is valid JSON -func handleEmptyConfgFile(credentialsFile string, client *Client) string { +func handleEmptyConfgFile(credentialsFile string, client *Client) { f, err := os.Open(credentialsFile) defer func(f *os.File) { err := f.Close() @@ -119,7 +119,6 @@ func handleEmptyConfgFile(credentialsFile string, client *Client) string { } } } - return client.credentialsFile } // NewClient returns a new registry client with config @@ -137,7 +136,7 @@ func NewClient(options ...ClientOption) (*Client, error) { client.credentialsFile = helmpath.ConfigPath(CredentialsFileBasename) } - client.credentialsFile = handleEmptyConfgFile(client.credentialsFile, client) + handleEmptyConfgFile(client.credentialsFile, client) if client.httpClient == nil { transport := newTransport()