diff --git a/crates/core/src/commands/mod.rs b/crates/core/src/commands/mod.rs index 7ca5a9d..f3ab775 100644 --- a/crates/core/src/commands/mod.rs +++ b/crates/core/src/commands/mod.rs @@ -68,7 +68,7 @@ impl<'a, S: AsRef> CommandArguments<'a, S> { } } - pub(crate) const fn on_target(mut self, target: Option<&'a Target>) -> Self { + pub(crate) const fn execute_on_remote(mut self, target: Option<&'a Target>) -> Self { self.target = target; self } diff --git a/crates/core/src/hive/steps/activate.rs b/crates/core/src/hive/steps/activate.rs index df7c94d..9483fdd 100644 --- a/crates/core/src/hive/steps/activate.rs +++ b/crates/core/src/hive/steps/activate.rs @@ -58,7 +58,7 @@ async fn set_profile( let child = run_command( &CommandArguments::new(command_string, ctx.modifiers) .mode(crate::commands::ChildOutputMode::Nix) - .on_target(if apply_objective.should_apply_locally { + .execute_on_remote(if apply_objective.should_apply_locally { None } else { Some(&ctx.node.target) @@ -121,7 +121,7 @@ impl ExecuteStep for SwitchToConfiguration { let child = run_command( &CommandArguments::new(command_string, ctx.modifiers) - .on_target(if apply_objective.should_apply_locally { + .execute_on_remote(if apply_objective.should_apply_locally { None } else { Some(&ctx.node.target) @@ -150,7 +150,7 @@ impl ExecuteStep for SwitchToConfiguration { let reboot = run_command( &CommandArguments::new("reboot now", ctx.modifiers) .log_stdout() - .on_target(Some(&ctx.node.target)) + .execute_on_remote(Some(&ctx.node.target)) .elevated(ctx.node), ) .await?; diff --git a/crates/core/src/hive/steps/build.rs b/crates/core/src/hive/steps/build.rs index 6ce9f50..ea8a46a 100644 --- a/crates/core/src/hive/steps/build.rs +++ b/crates/core/src/hive/steps/build.rs @@ -54,7 +54,7 @@ impl ExecuteStep for Build { // // (building remotely but applying locally does not logically // make any sense) - .on_target( + .execute_on_remote( if ctx.node.build_remotely && let Objective::Apply(apply_objective) = ctx.objective && apply_objective.should_apply_locally diff --git a/crates/core/src/hive/steps/keys.rs b/crates/core/src/hive/steps/keys.rs index 9433e5a..766bced 100644 --- a/crates/core/src/hive/steps/keys.rs +++ b/crates/core/src/hive/steps/keys.rs @@ -266,7 +266,7 @@ impl ExecuteStep for Keys { let mut child = run_command( &CommandArguments::new(command_string, ctx.modifiers) - .on_target(if apply_objective.should_apply_locally { + .execute_on_remote(if apply_objective.should_apply_locally { None } else { Some(&ctx.node.target)