vlt 0.1.0

Fast offline-first CLI for managing .env files across environments
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::path::Path;

use anyhow::{Result, bail};

pub fn ensure_initialized(root: &Path) -> Result<()> {
    if !root.join(".vlt").exists() {
        bail!("Project not initialized. Run `vlt init` first.");
    }

    if !root.join(".vlt/config.toml").exists() || !root.join(".vlt/env.rules").exists() {
        bail!("vlt project is incomplete. Run `vlt init` again.");
    }

    Ok(())
}