[pve-devel] [PATCH installer 01/14] chroot: print full anyhow message
Christoph Heiss
c.heiss at proxmox.com
Wed Jul 10 15:27:40 CEST 2024
This forces anyhow to give more context to the stringified error, which
helps tremendously when trying to make sense of these messages.
Signed-off-by: Christoph Heiss <c.heiss at proxmox.com>
---
proxmox-chroot/src/main.rs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/proxmox-chroot/src/main.rs b/proxmox-chroot/src/main.rs
index ca6f3a9..519e3f3 100644
--- a/proxmox-chroot/src/main.rs
+++ b/proxmox-chroot/src/main.rs
@@ -79,7 +79,7 @@ fn main() {
Commands::Cleanup(args) => cleanup(args),
};
if let Err(err) = res {
- eprintln!("{err}");
+ eprintln!("{err:#}");
std::process::exit(1);
}
}
@@ -108,7 +108,7 @@ fn cleanup(args: &CommandCleanup) -> Result<()> {
let fs = get_fs(args.filesystem)?;
if let Err(e) = bind_umount() {
- eprintln!("{e}")
+ eprintln!("{e:#}")
}
match fs {
@@ -188,7 +188,7 @@ fn mount_fs() -> Result<()> {
.arg(product.to_string())
.output();
match res {
- Err(e) => bail!("{e}"),
+ Err(e) => bail!("{e:#}"),
Ok(output) => {
if output.status.success() {
println!(
--
2.45.1
More information about the pve-devel
mailing list