Skip to content

Commit a98122f

Browse files
authored
Fix os.FileMode was meant to be in octal. (#236)
1 parent 99cb3ee commit a98122f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ func (g *GitClient) GitCryptUnlock(base64key string) error {
216216
return fmt.Errorf("failed to decode git-crypt key")
217217
}
218218
keyPath := filepath.Join(keyDir, "git-crypt-key")
219-
if err := ioutil.WriteFile(keyPath, decodedKey, 600); err != nil {
219+
if err := ioutil.WriteFile(keyPath, decodedKey, os.FileMode(0600)); err != nil {
220220
return fmt.Errorf("failed to write git-crypt key to file: %s", err)
221221
}
222222
if err := g.command("git-crypt", "unlock", keyPath).Run(); err != nil {

0 commit comments

Comments
 (0)