MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / seed_config

Function seed_config

atomic-cli/src/commands/workspace/set.rs:304–313  ·  view source on GitHub ↗
(default_org: &str, existing_workspace: Option<(&str, &str)>)

Source from the content-addressed store, hash-verified

302 }
303
304 fn seed_config(default_org: &str, existing_workspace: Option<(&str, &str)>) {
305 let mut cfg = GlobalConfig::load().unwrap();
306 cfg.server.default_org = Some(default_org.to_string());
307 if let Some((org, ws)) = existing_workspace {
308 cfg.server
309 .default_workspaces
310 .insert(org.to_string(), ws.to_string());
311 }
312 cfg.save().unwrap();
313 }
314
315 #[test]
316 #[serial]

Calls 3

unwrapMethod · 0.45
insertMethod · 0.45
saveMethod · 0.45

Tested by

no test coverage detected