diff --git a/Tools.ps1 b/Tools.ps1 index b3a9638..be5b1c2 100644 --- a/Tools.ps1 +++ b/Tools.ps1 @@ -126,11 +126,11 @@ param( [string]$Arguments='null', [Parameter(Mandatory=$false,ParameterSetName='live-ps')] [Parameter(Mandatory=$false,ParameterSetName='local')] - [System.Collections.ArrayList]$HaltIfRunning='null' + [System.Collections.ArrayList]$HaltIfRunning ) $LogName = $MyInvocation.MyCommand If ( $Arguments -eq "null" ) { $Arguments = $null } -If ( $HaltIfRunning -eq "null" ) { $HaltIfRunning = $null } +#If (! ($HaltIfRunning) ) { $HaltIfRunning = $null } switch ($PSCmdlet.ParameterSetName) { 'live-ps' @@ -151,7 +151,7 @@ switch ($PSCmdlet.ParameterSetName) If ( Test-Path $Path ) { $Halt = $false - If ( $HaltIfRunning -ne $null ) + If ( $HaltIfRunning ) { Log "Checking for running instances of the following dependent apps:" -Name $LogName ForEach ( $name in $HaltIfRunning)