Read the output from the build process.
This commit is contained in:
@@ -38,9 +38,11 @@ pub(crate) async fn run_build(args: BuildArgs) -> Result<()> {
|
||||
};
|
||||
|
||||
prepare_flake_repo(&config, target_config).await?;
|
||||
build_target(&config, target_config).await?;
|
||||
build_target(&db_handle, &config, target_config).await?;
|
||||
}
|
||||
|
||||
db_handle.conn.close().await;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -74,7 +76,11 @@ async fn prepare_flake_repo(config_root: &Config, target_config: &TargetConfig)
|
||||
Ok(())
|
||||
}
|
||||
|
||||
async fn build_target(config_root: &Config, target_config: &TargetConfig) -> Result<()> {
|
||||
async fn build_target(
|
||||
db_handle: &DbHandle,
|
||||
config_root: &Config,
|
||||
target_config: &TargetConfig,
|
||||
) -> Result<()> {
|
||||
let flake_directory = target_config.get_flake_directory(config_root)?;
|
||||
let build_directory = target_config.get_build_directory(config_root)?;
|
||||
assert_directory!(
|
||||
@@ -83,7 +89,13 @@ async fn build_target(config_root: &Config, target_config: &TargetConfig) -> Res
|
||||
build_directory.to_string_lossy()
|
||||
);
|
||||
|
||||
nixos_build_target(build_directory, flake_directory, target_config.get_attr()?).await?;
|
||||
nixos_build_target(
|
||||
db_handle,
|
||||
build_directory,
|
||||
flake_directory,
|
||||
target_config.get_attr()?,
|
||||
)
|
||||
.await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user