Better env usage

This commit is contained in:
ben
2025-02-27 20:04:06 +01:00
parent 703ca68f19
commit 0f09f3fbb4

View File

@@ -15,7 +15,11 @@ done
# Check for required environment variable
if [[ -z "${LLM_API_KEY}" ]]; then
echo "The environment variable LLM_API_KEY is not set."
echo "You can use the following command: 'export \$(xargs < ${SCRIPTPATH}/../.env)'"
echo "Try to load ${SCRIPTPATH}/../.env file"
export $(xargs <${SCRIPTPATH}/../.env)
fi
if [[ -z "${LLM_API_KEY}" ]]; then
echo "Failed to load ${SCRIPTPATH}/../.env file"
exit 1
fi