garm/cmd/garm-cli/config/home_nix.go

21 lines
328 B
Go
Raw Normal View History

2022-05-02 17:55:29 +00:00
//go:build !windows
// +build !windows
package config
import (
"os"
"path/filepath"
2022-05-03 12:40:59 +00:00
"github.com/pkg/errors"
2022-05-02 17:55:29 +00:00
)
func getHomeDir() (string, error) {
2022-05-03 12:40:59 +00:00
home, err := os.UserHomeDir()
if err != nil {
return "", errors.Wrap(err, "fetching home dir")
2022-05-02 17:55:29 +00:00
}
return filepath.Join(home, ".local", "share", DefaultAppFolder), nil
}