1
0
mirror of https://github.com/getsops/sops.git synced 2026-02-05 12:45:21 +01:00

Use $HOME instead ~ to find the gnupg directory.

This commit is contained in:
Jan-Otto Kröpke
2018-11-25 16:27:36 +01:00
committed by GitHub
parent 108e66f46f
commit b72e3bf3f1

View File

@@ -246,7 +246,7 @@ func (key *MasterKey) gpgHome() string {
if dir == "" {
usr, err := user.Current()
if err != nil {
return "~/.gnupg"
return path.Join(os.Getenv("HOME"), "/.gnupg")
}
return path.Join(usr.HomeDir, ".gnupg")
}