]> git.proxmox.com Git - pve-installer.git/commitdiff
chroot: print full anyhow message
authorChristoph Heiss <c.heiss@proxmox.com>
Wed, 10 Jul 2024 13:27:40 +0000 (15:27 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 15 Jul 2024 10:17:47 +0000 (12:17 +0200)
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@proxmox.com>
Tested-By: Stefan Hanreich <s.hanreich@proxmox.com>
Reviewed-By: Stefan Hanreich <s.hanreich@proxmox.com>
proxmox-chroot/src/main.rs

index ca6f3a9076713cc4fb398486715766915bae03f7..519e3f350ba320cad77e551f5aab016d94721d64 100644 (file)
@@ -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!(