Fix operator

Signed-off-by: Scott Rigby <scott@r6by.com>
pull/30924/head
Scott Rigby 4 months ago
parent b50363b5bd
commit 6099f13490
No known key found for this signature in database
GPG Key ID: C7C6FBB5B91C1155

@ -107,7 +107,7 @@ func handleEmptyConfgFile(credentialsFile string, client *Client) {
if err == nil { if err == nil {
var configData map[string]json.RawMessage var configData map[string]json.RawMessage
// handle only if credentials file is empty // handle only if credentials file is empty
if err := json.NewDecoder(f).Decode(&configData); err != nil && !errors.Is(err, io.EOF) { if err := json.NewDecoder(f).Decode(&configData); err != nil && errors.Is(err, io.EOF) {
// Attempt to write empty JSON map to config file // Attempt to write empty JSON map to config file
client.credentialsFile = "" client.credentialsFile = ""
encoder := json.NewEncoder(f) encoder := json.NewEncoder(f)

Loading…
Cancel
Save