scarb 0.5.2

The Cairo package manager
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use anyhow::{Context, Result};

use crate::core::Config;
use crate::internal::fsx;

#[tracing::instrument(skip_all, level = "debug")]
pub fn clean(config: &Config) -> Result<()> {
    let path = config.target_dir().path_unchecked();
    if path.exists() {
        fsx::remove_dir_all(path).context("failed to clean generated artifacts")?;
    }
    Ok(())
}