zacor 0.1.0

Package manager and dispatcher for zr — install, manage, and run modular CLI packages
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::error::*;
use crate::receipt;
use std::path::Path;

pub fn run(home: &Path, name: &str) -> Result<()> {
    let mut r = receipt::require(home, name)?;

    if !r.active {
        eprintln!("{} is already inactive", name);
        return Ok(());
    }

    r.active = false;
    receipt::write(home, name, &r)?;
    eprintln!("disabled {}", name);
    Ok(())
}