hm-plugin-cloud 0.0.5

Cloud client library for the hm CLI.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! `hm cloud logout` — clears the stored bearer token.

use std::collections::BTreeMap;

use anyhow::Result;

use crate::config::Config;
use crate::creds;

pub(crate) async fn run(env: &BTreeMap<String, String>) -> Result<()> {
    let cfg = Config::from_env(env);
    creds::clear_token(&cfg.api_base);
    tracing::info!("logged out of {}", cfg.api_base);
    Ok(())
}