From ae0086e5fded6d869650fbef3dc7f45cb8790ac3 Mon Sep 17 00:00:00 2001 From: Boming Zhang Date: Sun, 14 Sep 2025 18:09:56 -0700 Subject: [PATCH] feat: fatal on exit --- bin/joj3-forge-convert | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/joj3-forge-convert b/bin/joj3-forge-convert index dafaea5..7a30381 100755 --- a/bin/joj3-forge-convert +++ b/bin/joj3-forge-convert @@ -18,6 +18,7 @@ main() { repo_name=$(basename "$(pwd)") course=${repo_name%-*} if ! [[ "$course" =~ ^[a-zA-Z0-9_-]+$ ]]; then + echo "FATAL: Invalid course name: $course" exit 1 fi @@ -67,6 +68,9 @@ EOF GITEA_ORG_NAME=$org_name GITEA_ACCESS_TOKEN=$TEAPOT_GITEA_TOKEN EOF + else + echo "FATAL: TEAPOT_GITEA_TOKEN not set" + exit 1 fi }