forked from DGNum/colmena
Fix upload-keys command
This commit is contained in:
parent
ed23d1da67
commit
ce0782ccac
2 changed files with 21 additions and 22 deletions
|
@ -1,6 +1,6 @@
|
|||
use std::io::Write;
|
||||
|
||||
use clap::{ArgMatches, Command as ClapCommand, FromArgMatches, Args};
|
||||
use clap::{ArgMatches, Args, Command as ClapCommand, FromArgMatches};
|
||||
use tempfile::Builder as TempFileBuilder;
|
||||
use tokio::process::Command;
|
||||
|
||||
|
@ -12,12 +12,11 @@ use crate::nix::info::NixCheck;
|
|||
#[command(
|
||||
name = "repl",
|
||||
about = "Start an interactive REPL with the complete configuration",
|
||||
long_about =
|
||||
r#"Start an interactive REPL with the complete configuration
|
||||
long_about = r#"Start an interactive REPL with the complete configuration
|
||||
|
||||
In the REPL, you can inspect the configuration interactively with tab
|
||||
completion. The node configurations are accessible under the `nodes`
|
||||
attribute set."#,
|
||||
attribute set."#
|
||||
)]
|
||||
pub struct Opts {}
|
||||
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
use clap::{builder::PossibleValuesParser, Arg, Args, Command as ClapCommand};
|
||||
use clap::{Args, Command as ClapCommand};
|
||||
|
||||
use crate::util;
|
||||
use crate::{nix::Goal, util};
|
||||
|
||||
pub use super::apply::run;
|
||||
use super::apply::DeployOpts;
|
||||
|
||||
pub fn subcommand() -> ClapCommand {
|
||||
let command = ClapCommand::new("upload-keys")
|
||||
.about("Upload keys to remote hosts")
|
||||
.long_about(
|
||||
r#"Upload keys to remote hosts
|
||||
#[derive(Debug, Args)]
|
||||
#[command(
|
||||
name = "upload-keys",
|
||||
about = "Upload keys to remote hosts",
|
||||
long_about = r#"Upload keys to remote hosts
|
||||
|
||||
This subcommand behaves as if you invoked `apply` with the pseudo `keys` goal."#,
|
||||
)
|
||||
.arg(
|
||||
Arg::new("goal")
|
||||
.hide(true)
|
||||
.default_value("keys")
|
||||
.value_parser(PossibleValuesParser::new(["keys"]))
|
||||
.num_args(1),
|
||||
);
|
||||
|
||||
util::register_selector_args(DeployOpts::augment_args_for_update(command))
|
||||
This subcommand behaves as if you invoked `apply` with the pseudo `keys` goal."#
|
||||
)]
|
||||
pub struct Opts {
|
||||
#[command(flatten)]
|
||||
deploy: DeployOpts,
|
||||
#[arg(hide = true, default_value_t = Goal::Build)]
|
||||
goal: Goal,
|
||||
}
|
||||
|
||||
pub fn subcommand() -> ClapCommand {
|
||||
Opts::augment_args(ClapCommand::new("upload-keys"))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue