feat: refactor commands and support update profile

This commit is contained in:
GyDi
2021-12-18 02:01:02 +08:00
parent c1bcfc6785
commit 98378e6261
9 changed files with 280 additions and 229 deletions

View File

@@ -99,13 +99,12 @@ pub fn read_profiles() -> ProfilesConfig {
}
/// Save Verge App Config
pub fn save_profiles(profiles: &ProfilesConfig) {
pub fn save_profiles(profiles: &ProfilesConfig) -> Result<(), String> {
save_yaml(
app_home_dir().join("profiles.yaml"),
profiles,
Some("# Profiles Config for Clash Verge\n\n"),
)
.unwrap();
}
#[test]