Files
harbor/crates/cli/src/main.rs
T
pure_sagacity 249a953d3c added gitignore for result for nix
tried to build the nix
fixed it as well
2026-07-13 18:19:14 -05:00

32 lines
779 B
Rust

use std::process;
use clap::Parser;
use clap::crate_version;
use cli::Cli;
use colored::*;
const GIT_VERSION: &str = env!("GIT_VERSION");
fn main() {
let cli = Cli::parse();
if cli.version {
let top_msg = format!("Harbor version {}", crate_version!().green()).bright_blue();
let bottom_msg =
format!("An open source secrets management and distribution platform.").blue();
let commit_msg = format!("Git commit {}", GIT_VERSION).dimmed();
println!("{}\n{}\n{}", top_msg, bottom_msg, commit_msg);
process::exit(0);
}
if cli.command.is_none() {
println!(
"{}\n{}",
"No command was entered.".red(),
"Exiting...".dimmed()
);
process::exit(0);
}
}