File tree Expand file tree Collapse file tree 1 file changed +13
-9
lines changed
Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -245,15 +245,19 @@ echo "============================================================"
245245echo " Refreshing Content Understanding Cognitive Services account..."
246246echo " ============================================================"
247247
248- CU_ACCOUNT_NAME=$( azd env get-value CONTENT_UNDERSTANDING_ACCOUNT_NAME)
248+ CU_ACCOUNT_NAME=$( azd env get-value CONTENT_UNDERSTANDING_ACCOUNT_NAME 2> /dev/null || echo " " )
249249
250- az cognitiveservices account update \
251- -g " $RESOURCE_GROUP " \
252- -n " $CU_ACCOUNT_NAME " \
253- --tags refresh=true
254-
255- if [ $? -eq 0 ]; then
256- echo " ✅ Successfully refreshed Cognitive Services account '$CU_ACCOUNT_NAME '."
250+ if [ -z " $CU_ACCOUNT_NAME " ]; then
251+ echo " ⚠️ CONTENT_UNDERSTANDING_ACCOUNT_NAME not found in azd env. Skipping refresh."
257252else
258- echo " ❌ Failed to refresh Cognitive Services account '$CU_ACCOUNT_NAME '."
253+ echo " Refreshing account: $CU_ACCOUNT_NAME in resource group: $RESOURCE_GROUP "
254+ if az cognitiveservices account update \
255+ -g " $RESOURCE_GROUP " \
256+ -n " $CU_ACCOUNT_NAME " \
257+ --tags refresh=true \
258+ --output none; then
259+ echo " ✅ Successfully refreshed Cognitive Services account '$CU_ACCOUNT_NAME '."
260+ else
261+ echo " ❌ Failed to refresh Cognitive Services account '$CU_ACCOUNT_NAME '."
262+ fi
259263fi
You can’t perform that action at this time.
0 commit comments