Skip to content

Commit ee4457f

Browse files
committed
Add check for CSV content
1 parent 172cddf commit ee4457f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

AZURE-AppService-Update_RestrictionIP/AppService-Update_RestrictionIP.ps1

+3
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ try {
6363
# Load CSV
6464
Write-Verbose -Message "Loading CSV File '$Path'..."
6565
$FileContent = Import-Csv -path $Path
66+
if($null -eq $FileContent){
67+
Write-Error -Message "CSV file is empty or not able to import"
68+
}
6669

6770
# Establish connection to Azure if not already connected
6871
Write-Verbose -Message "Checking connection to Azure..."

0 commit comments

Comments
 (0)