vela-cli 0.940.0

The vela command-line tool: build, check, sign, replay, and publish scientific frontier state.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Current-only `vela check`.

use std::path::{Path, PathBuf};

pub(crate) fn cmd_check(source: Option<&Path>, _strict: bool, json_output: bool) {
    crate::ui::set_mode("check", json_output);
    let frontier = source.map_or_else(|| PathBuf::from("."), Path::to_path_buf);
    if !frontier.is_dir() || !frontier.join(".vela/epoch.json").is_file() {
        crate::ui::fail_with(
            crate::ui::ErrorKind::Domain,
            "this Vela release verifies only current repository epochs",
            Some(
                "inspect a predecessor with its pinned historical Vela release; current repositories contain `.vela/epoch.json`",
            ),
        );
    }
    crate::current_repository::cmd_repository_verify(&frontier, json_output);
}