mirror of
https://github.com/bestnite/sub2sing-box.git
synced 2025-10-27 17:31:17 +00:00
✨ The convert command has a new flag: config
🐛 Fix Fetch func cannot return err 🐛 Fix cannot read templates correctly
This commit is contained in:
@@ -176,8 +176,9 @@ func MergeTemplate(outbounds []model.Outbound, template string) (string, error)
|
||||
}
|
||||
} else {
|
||||
if !strings.Contains(template, string(filepath.Separator)) {
|
||||
if _, err := os.Stat(template); os.IsNotExist(err) {
|
||||
template = filepath.Join("templates", template)
|
||||
path := filepath.Join("templates", template)
|
||||
if _, err := os.Stat(path); err == nil {
|
||||
template = path
|
||||
}
|
||||
}
|
||||
config, err = ReadTemplate(template)
|
||||
|
||||
Reference in New Issue
Block a user