From: christiangoeschel Date: Sat, 28 Sep 2024 02:36:07 +0000 (-0400) Subject: Fixed buggy error handling that returns 1 on actual repo creation success X-Git-Url: https://git.christiangoeschel.com/?a=commitdiff_plain;h=1b9ca8dcbda19b0e6093c6184ca61da7739e240c;p=mygit.git Fixed buggy error handling that returns 1 on actual repo creation success --- diff --git a/server/mkrepo b/server/mkrepo index 2539bbe..589508d 100644 --- a/server/mkrepo +++ b/server/mkrepo @@ -40,11 +40,13 @@ function main() { REPO_NAME="${1}.git" create_repo - if [[ "${?}" != "" ]]; then + if [[ "${?}" != "0" ]]; then echo "${ERR_MSG}" exit 1 fi + echo "Successfully created repository ${REPO_NAME}" + exit 0 }