(os: &Os, path: &PathBuf, output: &mut impl Write)
| 495 | } |
| 496 | |
| 497 | async fn ensure_config_file(os: &Os, path: &PathBuf, output: &mut impl Write) -> Result<McpServerConfig> { |
| 498 | if !os.fs.exists(path) { |
| 499 | if let Some(parent) = path.parent() { |
| 500 | os.fs.create_dir_all(parent).await?; |
| 501 | } |
| 502 | McpServerConfig::default().save_to_file(os, path).await?; |
| 503 | writeln!(output, "\n📁 Created MCP config in '{}'", path.display())?; |
| 504 | } |
| 505 | |
| 506 | load_cfg(os, path).await |
| 507 | } |
| 508 | |
| 509 | fn parse_env_vars(arg: &str) -> Result<HashMap<String, String>> { |
| 510 | let mut vars = HashMap::new(); |
no test coverage detected