diff options
Diffstat (limited to 'pkgs/by-name/ba/back/src/main.rs')
-rw-r--r-- | pkgs/by-name/ba/back/src/main.rs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/pkgs/by-name/ba/back/src/main.rs b/pkgs/by-name/ba/back/src/main.rs index 009bdb6..b75737a 100644 --- a/pkgs/by-name/ba/back/src/main.rs +++ b/pkgs/by-name/ba/back/src/main.rs @@ -9,6 +9,8 @@ // You should have received a copy of the License along with this program. // If not, see <https://www.gnu.org/licenses/agpl.txt>. +use std::process; + use clap::Parser; use config::BackConfig; use rocket::routes; @@ -21,8 +23,17 @@ mod error; pub mod git_bug; mod web; +fn main() -> Result<(), String> { + if let Err(err) = rocket_main() { + eprintln!("Error {err}"); + process::exit(1); + } else { + Ok(()) + } +} + #[rocket::main] -async fn main() -> Result<(), error::Error> { +async fn rocket_main() -> Result<(), error::Error> { let args = cli::Cli::parse(); let config = BackConfig::from_config_file(&args.config_file)?; |