Problem with $VAR -eq ''

Jun 1, 2015 at 10:25 PM
Edited Jun 1, 2015 at 10:27 PM
Hello Kine,

i suspect the syntax $ENV:NAVIdePath -eq '' does not work in every case.

I tested this statement:
 $ENV:NAVIdePath = ''
if($ENV:NAVIdePath -eq '') {            
    Write-Host "Null"            
} else {            
    Write-Host "Full"            

if (!$ENV:NAVIdePath) 
    { Write-Host "Nill" } 
    {Write-Host "Fill" }

I debugged the source and found later this link.

Greetings Erik
Jun 2, 2015 at 7:15 AM
I Agree. This code was written when I didn't know how to test variables to some values. Should be the second variant.

Fixed in commit 1f6bc6cf5042c