MCPcopy Create free account
hub / github.com/brocode/fw / write_new_config_with_projects

Function write_new_config_with_projects

src/setup/mod.rs:171–184  ·  view source on GitHub ↗
(projects: BTreeMap<String, Project>, workspace_dir: &str)

Source from the content-addressed store, hash-verified

169}
170
171fn 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}

Callers 1

setupFunction · 0.85

Calls 2

write_settingsFunction · 0.85
write_projectFunction · 0.85

Tested by

no test coverage detected