mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 08:45:41 +08:00
feat: implement CoreConfigValidator for configuration validation and enhance logging types (#5112)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use super::{IClashTemp, IProfiles, IRuntime, IVerge};
|
||||
use crate::{
|
||||
config::{PrfItem, profiles_append_item_safe},
|
||||
core::{CoreManager, handle},
|
||||
core::{CoreManager, handle, validate::CoreConfigValidator},
|
||||
enhance, logging,
|
||||
utils::{Draft, dirs, help, logging::Type},
|
||||
};
|
||||
@@ -87,7 +87,7 @@ impl Config {
|
||||
// 验证配置文件
|
||||
logging!(info, Type::Config, "开始验证配置");
|
||||
|
||||
match CoreManager::global().validate_config().await {
|
||||
match CoreConfigValidator::global().validate_config().await {
|
||||
Ok((is_valid, error_msg)) => {
|
||||
if !is_valid {
|
||||
logging!(
|
||||
|
||||
Reference in New Issue
Block a user