nucrab 0.1.0

A simple package manager for nushell. Compatible with nupm.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use std::path::PathBuf;

use tokio::fs;

use crate::cli::UninstallCommand;

pub async fn uninstall(command: UninstallCommand, nupm_home: PathBuf) -> anyhow::Result<()> {
    let UninstallCommand { source } = command;

    println!("uninstalling {}...", source);
    fs::remove_dir_all(nupm_home.join(&source)).await?;
    println!("{} has been uninstalled", source);
    Ok(())
}