From 7fca502ca1530d5799e5e9ca508acd7e7b944f93 Mon Sep 17 00:00:00 2001 From: Aleksandr Maus Date: Mon, 14 Aug 2023 23:00:21 -0400 Subject: [PATCH] Fix return params for Get on windows --- internal/pkg/agent/vault/vault_windows.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/pkg/agent/vault/vault_windows.go b/internal/pkg/agent/vault/vault_windows.go index 76892918531..a5e05e942bd 100644 --- a/internal/pkg/agent/vault/vault_windows.go +++ b/internal/pkg/agent/vault/vault_windows.go @@ -136,11 +136,11 @@ func (v *Vault) Set(ctx context.Context, key string, data []byte) (err error) { err = v.unlock(err) }() - return ioutil.WriteFile(v.filepathFromKey(key), enc, 0600) + return writeFile(v.filepathFromKey(key), enc) } // Get retrieves the key from the vault store -func (v *Vault) Get(ctx context.Context, key string) ([]byte, error) { +func (v *Vault) Get(ctx context.Context, key string) (dec []byte, err error) { err = v.tryRLock(ctx) if err != nil { return nil, err