ARTEMIS-5003 User friendly error message in case profile file does not exist

This commit is contained in:
Clebert Suconic 2024-08-20 15:20:37 -04:00 committed by clebertsuconic
parent c932b75de6
commit 534526511f
2 changed files with 21 additions and 0 deletions

View File

@ -57,6 +57,16 @@ if [ -z "$ARTEMIS_PROFILE" ] ; then
fi
fi
if ! test -f "$ARTEMIS_INSTANCE_ETC/${ARTEMIS_PROFILE}"; then
echo "********************************************************************************"
echo Error: "$ARTEMIS_INSTANCE_ETC/${ARTEMIS_PROFILE}" does not exist.
echo
echo "This file should have been created as part of you upgrading from a previous version"
echo "Please use 'artemis upgrade' or make sure you create the file."
echo "********************************************************************************"
exit 1
fi
. "$ARTEMIS_INSTANCE_ETC/${ARTEMIS_PROFILE}"

View File

@ -52,6 +52,17 @@ set ARTEMIS_PROFILE=artemis-utility.profile.cmd
if "%1"=="run" set ARTEMIS_PROFILE=artemis.profile.cmd
:LOAD_ARTEMIS_PROFILE
IF NOT EXIST %ARTEMIS_INSTANCE_ETC%\%ARTEMIS_PROFILE% (
echo ********************************************************************************
echo Error: %ARTEMIS_INSTANCE_ETC%\%ARTEMIS_PROFILE% does not exist.
echo.
echo This file should have been created as part of you upgrading from a previous version
echo Please use 'artemis upgrade' or make sure you create the file.
echo ********************************************************************************
exit /b 1
)
call %ARTEMIS_INSTANCE_ETC%\%ARTEMIS_PROFILE% %*
if not exist %ARTEMIS_OOME_DUMP% goto NO_ARTEMIS_OOME_DUMP