nominal-cli 0.5.1

CLI for automating Nominal workflows
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use nominal::User;

use crate::validate::ValidationError;

pub fn print_profile_added_success(profile_name: &str, user: Option<&User>, config_path: &str) {
    if let Some(user) = user {
        println!("Authenticated as {}.", user.email());
    }
    println!("Profile '{profile_name}' saved to {config_path}.");
    println!(
        "Use this profile with `nomctl --profile {profile_name}` or `export NOMINAL_PROFILE={profile_name}`."
    );
}

pub fn print_validation_error(err: &ValidationError) {
    eprintln!("{err}");
    eprintln!("Failed to authenticate. See above for details.");
}