Skip to content

Commit

Permalink
Fix return params for Get on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksmaus committed Aug 15, 2023
1 parent be46f04 commit 7fca502
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/pkg/agent/vault/vault_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7fca502

Please sign in to comment.