Skip to content

Commit

Permalink
Merge pull request #123 from cgwalters/more-context
Browse files Browse the repository at this point in the history
install: Add some more error context
  • Loading branch information
cgwalters committed Sep 6, 2023
2 parents 0fc8252 + bca8fa4 commit d7309b6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/src/blockdev.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ impl Device {
}
}

#[context("Failed to wipe {dev}")]
pub(crate) fn wipefs(dev: &Utf8Path) -> Result<()> {
Task::new_and_run(
format!("Wiping device {dev}"),
Expand Down
1 change: 1 addition & 0 deletions lib/src/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,7 @@ async fn prepare_install(
reexecute_self_for_selinux_if_needed(&source, config_opts.disable_selinux)?;

let install_config = config::load_config()?;
tracing::debug!("Loaded install configuration");

// Create our global (read-only) state which gets wrapped in an Arc
// so we can pass it to worker threads too. Right now this just
Expand Down
3 changes: 2 additions & 1 deletion lib/src/install/baseline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,8 @@ pub(crate) fn install_create_rootfs(
"root",
Some("0FC63DAF-8483-4772-8E79-3D69D8477DE4"),
);
sgdisk.run()?;
sgdisk.run().context("Failed to run sgdisk")?;
tracing::debug!("Created partition table");

// Reread the partition table
{
Expand Down

0 comments on commit d7309b6

Please sign in to comment.