1
0
Fork 0

Support ~ in 'include' theme key for #308

This commit is contained in:
makeworld 2022-04-25 19:54:17 -04:00
parent bfb3893774
commit 3917402e2d
1 changed files with 6 additions and 1 deletions

View File

@ -375,7 +375,12 @@ func Init() error {
// Include key comes first
if incPath := configTheme.GetString("include"); incPath != "" {
incViper := viper.New()
incViper.SetConfigFile(incPath)
newIncPath, err := homedir.Expand(incPath)
if err == nil {
incViper.SetConfigFile(newIncPath)
} else {
incViper.SetConfigFile(incPath)
}
incViper.SetConfigType("toml")
err = incViper.ReadInConfig()
if err != nil {