feat: yaml merge key
This commit is contained in:
@@ -125,7 +125,7 @@ impl Clash {
|
||||
|
||||
/// get clash config
|
||||
pub fn read_config() -> Mapping {
|
||||
config::read_yaml::<Mapping>(dirs::clash_path())
|
||||
config::read_merge_mapping(dirs::clash_path())
|
||||
}
|
||||
|
||||
/// save the clash config
|
||||
|
||||
@@ -352,7 +352,7 @@ impl PrfItem {
|
||||
}),
|
||||
"merge" => Some(ChainItem {
|
||||
uid,
|
||||
data: ChainType::Merge(config::read_yaml::<Mapping>(path)),
|
||||
data: ChainType::Merge(config::read_merge_mapping(path)),
|
||||
}),
|
||||
_ => None,
|
||||
}
|
||||
|
||||
@@ -283,7 +283,7 @@ impl Profiles {
|
||||
bail!("failed to read the file \"{}\"", file_path.display());
|
||||
}
|
||||
|
||||
return Ok(config::read_yaml::<Mapping>(file_path.clone()));
|
||||
return Ok(config::read_merge_mapping(file_path.clone()));
|
||||
}
|
||||
}
|
||||
bail!("failed to find current profile \"uid:{current}\"");
|
||||
|
||||
Reference in New Issue
Block a user