Skip to content

Commit d7309b6

Browse files
authored
Merge pull request #123 from cgwalters/more-context
install: Add some more error context
2 parents 0fc8252 + bca8fa4 commit d7309b6

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

lib/src/blockdev.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ impl Device {
4040
}
4141
}
4242

43+
#[context("Failed to wipe {dev}")]
4344
pub(crate) fn wipefs(dev: &Utf8Path) -> Result<()> {
4445
Task::new_and_run(
4546
format!("Wiping device {dev}"),

lib/src/install.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,7 @@ async fn prepare_install(
763763
reexecute_self_for_selinux_if_needed(&source, config_opts.disable_selinux)?;
764764

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

767768
// Create our global (read-only) state which gets wrapped in an Arc
768769
// so we can pass it to worker threads too. Right now this just

lib/src/install/baseline.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,8 @@ pub(crate) fn install_create_rootfs(
263263
"root",
264264
Some("0FC63DAF-8483-4772-8E79-3D69D8477DE4"),
265265
);
266-
sgdisk.run()?;
266+
sgdisk.run().context("Failed to run sgdisk")?;
267+
tracing::debug!("Created partition table");
267268

268269
// Reread the partition table
269270
{

0 commit comments

Comments
 (0)