zoi-cli 1.24.6

Advanced Package Manager & Environment Orchestrator
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use anyhow::Result;
use clap_complete::Shell;
use colored::*;
use zoi_project::{config, environment};

pub fn run(env_alias: Option<String>, export_shell: Option<Shell>) -> Result<()> {
    let config = config::load()?;
    if let Some(shell) = export_shell {
        environment::export_shell(env_alias.as_deref(), &config, shell)?;
    } else {
        environment::setup(env_alias.as_deref(), &config)?;
        println!("\n{}", "Environment setup complete.".green());
    }
    Ok(())
}