Add ~/.config/lume/lume.conf to configuration file search paths
This commit is contained in:
parent
f0cf3e12b6
commit
100b585663
@ -11,6 +11,7 @@ import (
|
||||
)
|
||||
|
||||
const lumercFile string = ".lumerc"
|
||||
const lumeConfigFile string = "lume.conf"
|
||||
|
||||
type Config struct {
|
||||
AccessToken string `toml:"access_token"`
|
||||
@ -122,6 +123,15 @@ func getConfigPath() string {
|
||||
}
|
||||
}
|
||||
|
||||
// ~/.config/lume/lume.conf
|
||||
homeDir, err = os.UserHomeDir()
|
||||
if err == nil {
|
||||
tryPath = path.Join(homeDir, ".config/lume", lumeConfigFile)
|
||||
if _, err := os.Stat(tryPath); !os.IsNotExist(err) {
|
||||
configPath = tryPath
|
||||
}
|
||||
}
|
||||
|
||||
// ./.lumerc
|
||||
cwd, err = os.Getwd()
|
||||
if err == nil {
|
||||
|
Loading…
Reference in New Issue
Block a user