update type conversion

This commit is contained in:
2020-09-23 15:40:05 -04:00
parent 46cd6ccab5
commit 4e43b98a4f
+3 -3
View File
@@ -126,11 +126,11 @@ param(
[string]$Arguments='null', [string]$Arguments='null',
[Parameter(Mandatory=$false,ParameterSetName='live-ps')] [Parameter(Mandatory=$false,ParameterSetName='live-ps')]
[Parameter(Mandatory=$false,ParameterSetName='local')] [Parameter(Mandatory=$false,ParameterSetName='local')]
[System.Collections.ArrayList]$HaltIfRunning='null' [System.Collections.ArrayList]$HaltIfRunning
) )
$LogName = $MyInvocation.MyCommand $LogName = $MyInvocation.MyCommand
If ( $Arguments -eq "null" ) { $Arguments = $null } If ( $Arguments -eq "null" ) { $Arguments = $null }
If ( $HaltIfRunning -eq "null" ) { $HaltIfRunning = $null } #If (! ($HaltIfRunning) ) { $HaltIfRunning = $null }
switch ($PSCmdlet.ParameterSetName) switch ($PSCmdlet.ParameterSetName)
{ {
'live-ps' 'live-ps'
@@ -151,7 +151,7 @@ switch ($PSCmdlet.ParameterSetName)
If ( Test-Path $Path ) If ( Test-Path $Path )
{ {
$Halt = $false $Halt = $false
If ( $HaltIfRunning -ne $null ) If ( $HaltIfRunning )
{ {
Log "Checking for running instances of the following dependent apps:" -Name $LogName Log "Checking for running instances of the following dependent apps:" -Name $LogName
ForEach ( $name in $HaltIfRunning) ForEach ( $name in $HaltIfRunning)