fix: config parse error at launch
This commit is contained in:
parent
bdbb345010
commit
f6341c1721
@ -94,6 +94,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
||||
removeUnExistProxyGroups()
|
||||
|
||||
// start proxy
|
||||
initClashCore()
|
||||
setupData()
|
||||
updateConfig(showNotification: false)
|
||||
updateLoggingLevel()
|
||||
|
@ -46,10 +46,13 @@ func checkPortAvailable(port int, lan bool) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func parseConfig(checkPort bool) (*config.Config, error) {
|
||||
//export initClashCore
|
||||
func initClashCore() {
|
||||
configFile := filepath.Join(constant.Path.HomeDir(), constant.Path.Config())
|
||||
constant.SetConfig(configFile)
|
||||
}
|
||||
|
||||
func parseConfig(checkPort bool) (*config.Config, error) {
|
||||
cfg, err := executor.Parse()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
Loading…
Reference in New Issue
Block a user