Skip to content

Commit 77f81c3

Browse files
fix: enhance destroy target to check for AZURE_RESOURCE_GROUP before execution
1 parent 29c30e0 commit 77f81c3

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,5 +177,10 @@ disable-auth-fixed:
177177
fi
178178

179179
destroy: azd-login ## 🧨 Destroy everything in Azure
180-
@echo -e "\e[34m$@\e[0m" || true
181-
@azd down --force --purge --no-prompt
180+
@if [ -n "$(AZURE_RESOURCE_GROUP)" ]; then \
181+
echo "Using resource group: $(AZURE_RESOURCE_GROUP)"; \
182+
azd down --force --purge --no-prompt --resource-group $(AZURE_RESOURCE_GROUP); \
183+
else \
184+
echo "AZURE_RESOURCE_GROUP is not set"; \
185+
exit 1; \
186+
fi

0 commit comments

Comments
 (0)