update type conversion
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user