We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a652f8e + 372315b commit c740b99Copy full SHA for c740b99
pass/pass.go
@@ -13,6 +13,7 @@ import (
13
"os"
14
"os/exec"
15
"path"
16
+ "path/filepath"
17
"strings"
18
"sync"
19
@@ -104,11 +105,11 @@ func (p Pass) Delete(serverURL string) error {
104
105
}
106
107
func getPassDir() string {
- passDir := "$HOME/.password-store"
108
- if envDir := os.Getenv("PASSWORD_STORE_DIR"); envDir != "" {
109
- passDir = envDir
+ if passDir := os.Getenv("PASSWORD_STORE_DIR"); passDir != "" {
+ return passDir
110
111
- return os.ExpandEnv(passDir)
+ home, _ := os.UserHomeDir()
112
+ return filepath.Join(home, ".password-store")
113
114
115
// listPassDir lists all the contents of a directory in the password store.
0 commit comments