Record error when setting up repo fails rather than abort entire script.

This commit is contained in:
Tom Alexander
2026-08-08 23:50:23 -04:00
parent 6386febdb8
commit 0a270dcbdd
5 changed files with 85 additions and 44 deletions

View File

@@ -1,6 +1,7 @@
use std::ffi::OsStr;
use std::ffi::OsString;
use std::path::Path;
use std::process::ExitStatus;
use std::process::Stdio;
use tokio::process::Command;
@@ -19,7 +20,7 @@ pub(crate) async fn nixos_build_target<B, F, A, TN>(
attr: A,
target_name: TN,
build_id: i64,
) -> Result<()>
) -> Result<ExitStatus>
where
B: AsRef<Path>,
F: AsRef<Path>,
@@ -58,9 +59,9 @@ where
let child = command.spawn()?;
let mut running_build = RunningBuild::new(db_handle, build_id)?;
running_build.run_to_completion(child, target_name).await?;
let exit_status = running_build.run_to_completion(child, target_name).await?;
Ok(())
Ok(exit_status)
}
pub(crate) async fn nix_flake_update<F>(flake_path: F) -> Result<()>