(projects: BTreeMap<String, Project>, workspace_dir: &str)
| 169 | } |
| 170 | |
| 171 | fn write_new_config_with_projects(projects: BTreeMap<String, Project>, workspace_dir: &str) -> Result<(), AppError> { |
| 172 | let settings: config::settings::PersistedSettings = config::settings::PersistedSettings { |
| 173 | workspace: workspace_dir.to_owned(), |
| 174 | default_after_workon: None, |
| 175 | default_after_clone: None, |
| 176 | shell: None, |
| 177 | github_token: None, |
| 178 | }; |
| 179 | config::write_settings(&settings)?; |
| 180 | for p in projects.values() { |
| 181 | config::write_project(p)?; |
| 182 | } |
| 183 | Ok(()) |
| 184 | } |
no test coverage detected