mirror of
https://github.com/makew0rld/amfora.git
synced 2024-12-04 14:46:29 -05: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
|
||||
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 {
|
||||
|
Loading…
Reference in New Issue
Block a user