Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Fix os.FileMode was meant to be in octal. (#236)
Browse files Browse the repository at this point in the history
  • Loading branch information
rickardl authored Oct 23, 2020
1 parent 99cb3ee commit a98122f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit a98122f

Please sign in to comment.