Skip to content

Commit a56f57d

Browse files
FGoessleraqrln
andauthored
Apply suggestions from code review
Co-authored-by: Alexey Orlenko <[email protected]>
1 parent 50f9aa8 commit a56f57d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/scripts/wipe-azure.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# Exit on error
4-
set -e
4+
set -euo pipefail
55

66
# Take argument from command line
77
FN_RESOURCE_GROUP=$1 # prisma-e2e-windows or prisma-e2e-linux
@@ -14,7 +14,7 @@ if [ -z "$FN_RESOURCE_GROUP" ]; then
1414
fi
1515

1616
# Ensure the user is logged in
17-
if ! az account show > /dev/null 2>&1; then
17+
if ! az account show &> /dev/null then
1818
echo "You are not logged into Azure. Please run 'az login' first."
1919
exit 1
2020
fi
@@ -25,7 +25,7 @@ echo "Using subscription: $SUBSCRIPTION_ID"
2525

2626
# Get all Function Apps in the current subscription
2727
echo "Fetching all Function Apps in resource group $FN_RESOURCE_GROUP..."
28-
FUNCTION_APPS=$(az functionapp list --resource-group $FN_RESOURCE_GROUP --query "[].{name:name, resourceGroup:resourceGroup, appInsights:appInsights}" -o json)
28+
FUNCTION_APPS=$(az functionapp list --resource-group "$FN_RESOURCE_GROUP" --query "[].{name:name, resourceGroup:resourceGroup, appInsights:appInsights}" -o json)
2929

3030
# Check if there are any function apps
3131
if [ "$FUNCTION_APPS" == "[]" ]; then

0 commit comments

Comments
 (0)