summary refs log tree commit diff stats
path: root/pkgs/by-name/ba/back/src
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/ba/back/src')
-rw-r--r--pkgs/by-name/ba/back/src/cli.rs11
-rw-r--r--pkgs/by-name/ba/back/src/config/mod.rs11
-rw-r--r--pkgs/by-name/ba/back/src/main.rs13
3 files changed, 34 insertions, 1 deletions
diff --git a/pkgs/by-name/ba/back/src/cli.rs b/pkgs/by-name/ba/back/src/cli.rs
index 1820bf3..79f0d63 100644
--- a/pkgs/by-name/ba/back/src/cli.rs
+++ b/pkgs/by-name/ba/back/src/cli.rs
@@ -1,3 +1,14 @@
+// Back - An extremely simple git issue tracking system. Inspired by tvix's
+// panettone
+//
+// Copyright (C) 2024 Benedikt Peetz <benedikt.peetz@b-peetz.de>
+// SPDX-License-Identifier: AGPL-3.0-or-later
+//
+// This file is part of Back.
+//
+// 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::path::PathBuf;
 
 use clap::Parser;
diff --git a/pkgs/by-name/ba/back/src/config/mod.rs b/pkgs/by-name/ba/back/src/config/mod.rs
index 4986a41..a680b90 100644
--- a/pkgs/by-name/ba/back/src/config/mod.rs
+++ b/pkgs/by-name/ba/back/src/config/mod.rs
@@ -1,3 +1,14 @@
+// Back - An extremely simple git issue tracking system. Inspired by tvix's
+// panettone
+//
+// Copyright (C) 2024 Benedikt Peetz <benedikt.peetz@b-peetz.de>
+// SPDX-License-Identifier: AGPL-3.0-or-later
+//
+// This file is part of Back.
+//
+// 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::{
     fs,
     path::{Path, PathBuf},
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)?;