From e87b374aa302eb6feff4e0f4a3069e99bd151cbb Mon Sep 17 00:00:00 2001 From: anbo-de Date: Wed, 3 Jan 2024 14:53:56 +0100 Subject: [PATCH] build_images: added safety check --- service_config/build_images.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/service_config/build_images.sh b/service_config/build_images.sh index 8f4ded75..2db40cc4 100755 --- a/service_config/build_images.sh +++ b/service_config/build_images.sh @@ -70,6 +70,15 @@ then exit 2 # stop if no API key is set else sed -i "s/OPENAI_API_KEY_PLACEHOLDER/$OPENAI_API_KEY/g" ./service_config/files/ned-openai-gpt + # safety check + if [ `grep OPENAI_API_KEY_PLACEHOLDER ./service_config/files/ned-openai-gpt` ] + then + echo "check fails: OPENAI_API_KEY_PLACEHOLDER still in ned-openai-gpt"; + exit 3 # stop if no API key is set + else + echo "check ok: OPENAI_API_KEY_PLACEHOLDER was replaced in ned-openai-gpt"; + fi + fi