From 91f0cef6d9856c8b65d3fba0558968ec974719e9 Mon Sep 17 00:00:00 2001 From: Dave Henderson Date: Sun, 27 Sep 2020 13:01:48 -0400 Subject: Fix some Windows file mode issues Signed-off-by: Dave Henderson --- vault/auth.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'vault') diff --git a/vault/auth.go b/vault/auth.go index 201ad595..389acd55 100644 --- a/vault/auth.go +++ b/vault/auth.go @@ -11,6 +11,7 @@ import ( "github.com/hairyhenderson/gomplate/v3/aws" "github.com/hairyhenderson/gomplate/v3/conv" "github.com/hairyhenderson/gomplate/v3/env" + "github.com/hairyhenderson/gomplate/v3/internal/config" "github.com/pkg/errors" ) @@ -169,7 +170,7 @@ func (v *Vault) EC2Login() (string, error) { if val, ok := secret.Auth.Metadata["nonce"]; ok { nonce = val } - f, err := os.OpenFile(output, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, os.FileMode(0600)) + f, err := os.OpenFile(output, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, config.NormalizeFileMode(0o600)) if err != nil { return "", errors.Wrapf(err, "Error opening nonce output file") } -- cgit v1.2.3