From 946c3e8a812870c16fee53b12908cb341d88ebfe Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Wed, 26 Aug 2020 10:24:32 +0200 Subject: [PATCH] bin/backup-proxy: return error directly in main anyhow makes this a nice error message, similar to the manual wrapping used. Signed-off-by: Thomas Lamprecht --- src/bin/proxmox-backup-proxy.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/bin/proxmox-backup-proxy.rs b/src/bin/proxmox-backup-proxy.rs index b75cc763..3362fee3 100644 --- a/src/bin/proxmox-backup-proxy.rs +++ b/src/bin/proxmox-backup-proxy.rs @@ -20,13 +20,10 @@ use proxmox_backup::tools::disks::{ DiskManage, zfs_pool_stats }; use proxmox_backup::api2::pull::do_sync_job; -fn main() { +fn main() -> Result<(), Error> { proxmox_backup::tools::setup_safe_path_env(); - if let Err(err) = proxmox_backup::tools::runtime::main(run()) { - eprintln!("Error: {}", err); - std::process::exit(-1); - } + proxmox_backup::tools::runtime::main(run()) } async fn run() -> Result<(), Error> {