Honor cd failure when starting a CurseForge pack (#4257)

Co-authored-by: LCB <me@lbellows.com>
Co-authored-by: Geoff Bourne <itzgeoff@gmail.com>
This commit is contained in:
LB
2026-09-01 20:40:27 -05:00
committed by GitHub
co-authored by LCB Geoff Bourne
parent b0fbd35f7d
commit 82d89ee4eb
+8 -2
View File
@@ -500,7 +500,10 @@ fi
if [[ ${TYPE} == "CURSEFORGE" && "${SERVER}" ]]; then
copyFilesForCurseForge
cd "${FTB_DIR}" || (logError "Can't go into ${FTB_DIR}"; exit 1)
if ! cd "${FTB_DIR}"; then
logError "Can't go into ${FTB_DIR}"
exit 1
fi
log "Starting CurseForge server in ${FTB_DIR}..."
if isTrue "${DEBUG_EXEC}"; then
set -x
@@ -545,7 +548,10 @@ fi
fi
fi
cd "${FTB_DIR}" || (logError "Can't go into ${FTB_DIR}"; exit 1)
if ! cd "${FTB_DIR}"; then
logError "Can't go into ${FTB_DIR}"
exit 1
fi
log "Running FTB ${FTB_SERVER_START} in ${FTB_DIR} ..."
finalArgs="${FTB_SERVER_START}"