mirror of
https://github.com/makew0rld/amfora.git
synced 2024-09-11 05:55:27 +03:00
Support ~ in 'include' theme key for #308
This commit is contained in:
parent
bfb3893774
commit
3917402e2d
@ -375,7 +375,12 @@ func Init() error {
|
|||||||
// Include key comes first
|
// Include key comes first
|
||||||
if incPath := configTheme.GetString("include"); incPath != "" {
|
if incPath := configTheme.GetString("include"); incPath != "" {
|
||||||
incViper := viper.New()
|
incViper := viper.New()
|
||||||
incViper.SetConfigFile(incPath)
|
newIncPath, err := homedir.Expand(incPath)
|
||||||
|
if err == nil {
|
||||||
|
incViper.SetConfigFile(newIncPath)
|
||||||
|
} else {
|
||||||
|
incViper.SetConfigFile(incPath)
|
||||||
|
}
|
||||||
incViper.SetConfigType("toml")
|
incViper.SetConfigType("toml")
|
||||||
err = incViper.ReadInConfig()
|
err = incViper.ReadInConfig()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user