hagridctl: Disable regenerate.

- The regenerate command is too intertwined with the filesystem backend.
    Fix it later.
This commit is contained in:
Nora Widdecke 2022-01-19 15:22:17 +01:00
parent fd218bebba
commit bac42c0b8a
1 changed files with 5 additions and 5 deletions

View File

@ -21,7 +21,7 @@ use anyhow::Result;
use clap::{Arg, App, SubCommand}; use clap::{Arg, App, SubCommand};
mod import; mod import;
mod regenerate; //mod regenerate;
#[derive(Deserialize)] #[derive(Deserialize)]
pub struct HagridConfigs { pub struct HagridConfigs {
@ -60,8 +60,8 @@ fn main() -> Result<()> {
.takes_value(true) .takes_value(true)
.default_value("prod") .default_value("prod")
.possible_values(&["dev","stage","prod"])) .possible_values(&["dev","stage","prod"]))
.subcommand(SubCommand::with_name("regenerate") //.subcommand(SubCommand::with_name("regenerate")
.about("Regenerate symlink directory")) // .about("Regenerate symlink directory"))
.subcommand(SubCommand::with_name("import") .subcommand(SubCommand::with_name("import")
.about("Import keys into Hagrid") .about("Import keys into Hagrid")
.arg(Arg::with_name("dry run") .arg(Arg::with_name("dry run")
@ -93,8 +93,8 @@ fn main() -> Result<()> {
.map(|arg| PathBuf::from_str(arg).unwrap()) .map(|arg| PathBuf::from_str(arg).unwrap())
.collect(); .collect();
import::do_import(&config, dry_run, keyrings)?; import::do_import(&config, dry_run, keyrings)?;
} else if let Some(_matches) = matches.subcommand_matches("regenerate") { //} else if let Some(_matches) = matches.subcommand_matches("regenerate") {
regenerate::do_regenerate(&config)?; // regenerate::do_regenerate(&config)?;
} else { } else {
println!("{}", matches.usage()); println!("{}", matches.usage());
} }