BlockHost exit when name is empty
This commit is contained in:
parent
28853e6b0a
commit
f3829001d4
1 changed files with 1 additions and 1 deletions
|
@ -20,7 +20,7 @@ function BlockHost {
|
|||
|
||||
Foreach ($line in Get-Content $params.file ){ BlockHost -params @{host=$line} }
|
||||
}
|
||||
if ( $params.ContainsKey('host') ) {
|
||||
if ( $params.ContainsKey('host') -and $params.host -ne "" ) {
|
||||
Write-Host -NoNewline "`t$($params.host) : "
|
||||
try {
|
||||
if ( ! $(IsHostAlreadyBlocked $HOST_FILE $params.host) ){
|
||||
|
|
Reference in a new issue