Skip to content

Commit ea746a9

Browse files
committed
efi: add context when openning directory
This is not to fix the issue, add context to print more info for coreos#915 For example: `error: generating metadata failed: Opening /usr/lib/bootupd/ updates/EFI: No such file or directory (os error 2)`
1 parent da0e0fa commit ea746a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/efi.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ impl Component for Efi {
379379
Command::new("mv").args([&efisrc, &dest_efidir]).run()?;
380380
}
381381

382-
let efidir = openat::Dir::open(&dest_efidir)?;
382+
let efidir = openat::Dir::open(&dest_efidir).with_context(|| format!("Opening {}", dest_efidir.display()))?;
383383
let files = crate::util::filenames(&efidir)?.into_iter().map(|mut f| {
384384
f.insert_str(0, "/boot/efi/EFI/");
385385
f

0 commit comments

Comments
 (0)