(workspace: &Workspace)
| 581 | } |
| 582 | |
| 583 | async fn pin_firedbg_version(workspace: &Workspace) -> Result<()> { |
| 584 | let version = ¤t_firedbg_version(); |
| 585 | let version_path = &workspace.get_version_path(); |
| 586 | let version_path = Path::new(version_path); |
| 587 | let firedbg_dir = &workspace.get_firedbg_dir(); |
| 588 | |
| 589 | create_dir_all(firedbg_dir) |
| 590 | .await |
| 591 | .with_context(|| format!("Fail to create directory: `{firedbg_dir}`"))?; |
| 592 | let file_content = toml::to_string_pretty(version).context("Fail to serialize TOML")?; |
| 593 | fs::write(version_path, file_content).context("Fail to write")?; |
| 594 | Ok(()) |
| 595 | } |
| 596 | |
| 597 | async fn remove_firedbg_dir(workspace: &Workspace) -> Result<()> { |
| 598 | let firedbg_directory = &workspace.get_firedbg_dir(); |
no test coverage detected