From 95ded7fddbb37a62b2d337862e641cebdd428e88 Mon Sep 17 00:00:00 2001 From: i1i1 Date: Fri, 11 Aug 2023 19:04:39 +0300 Subject: [PATCH] Add node filter to `build` and `upload-keys` --- src/cli.rs | 2 -- src/command/apply.rs | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index 149583d..bd33c2d 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -296,7 +296,6 @@ pub async fn run() { let args = command::apply::Opts { deploy, goal: crate::nix::Goal::Build, - node_filter: Default::default(), }; r(command::apply::run(hive, args), opts.config).await } @@ -304,7 +303,6 @@ pub async fn run() { let args = command::apply::Opts { deploy, goal: crate::nix::Goal::UploadKeys, - node_filter: Default::default(), }; r(command::apply::run(hive, args), opts.config).await } diff --git a/src/command/apply.rs b/src/command/apply.rs index db3e791..33395db 100644 --- a/src/command/apply.rs +++ b/src/command/apply.rs @@ -113,6 +113,8 @@ will treat deployment.replaceUnknownProfiles as though it was set true and perfo This is an experimental feature."# )] evaluator: EvaluatorType, + #[command(flatten)] + node_filter: NodeFilterOpts, } #[derive(Debug, Args)] @@ -136,8 +138,6 @@ Same as the targets for switch-to-configuration, with the following extra pseudo pub goal: Goal, #[command(flatten)] pub deploy: DeployOpts, - #[command(flatten)] - pub node_filter: NodeFilterOpts, } pub async fn run(hive: Hive, opts: Opts) -> Result<(), ColmenaError> { @@ -159,8 +159,8 @@ pub async fn run(hive: Hive, opts: Opts) -> Result<(), ColmenaError> { no_build_on_target, force_replace_unknown_profiles, evaluator, + node_filter, }, - node_filter, } = opts; if node_filter.on.is_none() && goal != Goal::Build {