diff options
Diffstat (limited to '')
-rw-r--r-- | src/main.rs | 7 | ||||
-rw-r--r-- | src/utils/push.rs | 5 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs index cb297ad..7d7fcf9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -95,6 +95,7 @@ async fn push_all_profiles( cmd_overrides: &utils::CmdOverrides, keep_result: bool, result_path: Option<&str>, + extra_build_args: &[String], ) -> Result<(), PushAllProfilesError> { info!("Pushing all profiles for `{}`", node_name); @@ -145,6 +146,7 @@ async fn push_all_profiles( &deploy_defs, keep_result, result_path, + extra_build_args, ) .await .map_err(|e| PushAllProfilesError::PushProfileError(profile_name.to_owned(), e))?; @@ -377,6 +379,7 @@ async fn run_deploy( cmd_overrides: utils::CmdOverrides, keep_result: bool, result_path: Option<&str>, + extra_build_args: &[String], ) -> Result<(), RunDeployError> { match (deploy_flake.node, deploy_flake.profile) { (Some(node_name), Some(profile_name)) => { @@ -408,6 +411,7 @@ async fn run_deploy( &deploy_defs, keep_result, result_path, + extra_build_args, ) .await?; @@ -429,6 +433,7 @@ async fn run_deploy( &cmd_overrides, keep_result, result_path, + extra_build_args, ) .await?; @@ -448,6 +453,7 @@ async fn run_deploy( &cmd_overrides, keep_result, result_path, + extra_build_args, ) .await?; } @@ -531,6 +537,7 @@ async fn run() -> Result<(), RunError> { cmd_overrides, opts.keep_result, result_path, + &opts.extra_build_args, ) .await?; diff --git a/src/utils/push.rs b/src/utils/push.rs index d52fbbe..2ea259a 100644 --- a/src/utils/push.rs +++ b/src/utils/push.rs @@ -33,6 +33,7 @@ pub async fn push_profile( deploy_defs: &super::DeployDefs<'_>, keep_result: bool, result_path: Option<&str>, + extra_build_args: &[String], ) -> Result<(), PushProfileError> { info!( "Building profile `{}` for node `{}`", @@ -74,6 +75,10 @@ pub async fn push_profile( (false, true) => build_command.arg("--no-link"), }; + for extra_arg in extra_build_args { + build_command = build_command.arg(extra_arg); + } + let build_exit_status = build_command // Logging should be in stderr, this just stops the store path from printing for no reason .stdout(Stdio::null()) |