manta-cli 2.0.0-beta.4

Another CLI for ALPS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Implements the `manta config unset parent-hsm` command.

use anyhow::Error;

use manta_shared::common::config::{read_config_toml, write_config_toml};

/// Remove the parent HSM group from configuration.
///
/// Pure local-file edit — no backend or server interaction.
pub fn exec() -> Result<(), Error> {
  let (path, mut doc) = read_config_toml()?;
  tracing::info!("Unset parent HSM group");
  doc.remove("parent_hsm_group");
  write_config_toml(&path, &doc)?;
  println!("Parent HSM group unset");
  Ok(())
}