From a98122fceb4850e5a7ec38a19cf0fa81549f3b38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rickard=20L=C3=B6fstr=C3=B6m?= Date: Fri, 23 Oct 2020 22:53:21 +0200 Subject: [PATCH] Fix os.FileMode was meant to be in octal. (#236) --- git.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git.go b/git.go index 95523349..53f339d4 100644 --- a/git.go +++ b/git.go @@ -216,7 +216,7 @@ func (g *GitClient) GitCryptUnlock(base64key string) error { return fmt.Errorf("failed to decode git-crypt key") } keyPath := filepath.Join(keyDir, "git-crypt-key") - if err := ioutil.WriteFile(keyPath, decodedKey, 600); err != nil { + if err := ioutil.WriteFile(keyPath, decodedKey, os.FileMode(0600)); err != nil { return fmt.Errorf("failed to write git-crypt key to file: %s", err) } if err := g.command("git-crypt", "unlock", keyPath).Run(); err != nil {