summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorNick White <git@njw.name>2020-07-27 15:08:29 +0100
committerNick White <git@njw.name>2020-07-27 15:08:29 +0100
commitca2eaad606ac9ebaa4e827b30deb8881f341c220 (patch)
treec8a055bce53c3316a28bad93e780e1a39004f59b /cmd
parent132d23db6f12e056b655503203a22019ec86c17e (diff)
Use os.Getenv() to find config dir, rather than rely on os.UserConfigDir(), as that isnt present on go1.11
Diffstat (limited to 'cmd')
-rw-r--r--cmd/bookpipeline/main.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/cmd/bookpipeline/main.go b/cmd/bookpipeline/main.go
index 0bd1eb2..9bc3378 100644
--- a/cmd/bookpipeline/main.go
+++ b/cmd/bookpipeline/main.go
@@ -90,11 +90,7 @@ type mailSettings struct {
}
func getMailSettings() (mailSettings, error) {
- confdir, err := os.UserConfigDir()
- if err != nil {
- return mailSettings{}, fmt.Errorf("Error finding UserConfigDir for mailsettings: %v", err)
- }
- p := filepath.Join(confdir, "bookpipeline", "mailsettings")
+ p := filepath.Join(os.Getenv("HOME"), ".config", "bookpipeline", "mailsettings")
b, err := ioutil.ReadFile(p)
if err != nil {
return mailSettings{}, fmt.Errorf("Error reading mailsettings from %s: %v", p, err)