Fix dps and Get-HAPath
DPS -MatchAny should work better now Get-HAPath refined
This commit is contained in:
parent
0a2bb25700
commit
fd9b8a968c
|
@ -1,6 +1,9 @@
|
|||
if( $HAConfigPath ) { return $HAConfigPath }
|
||||
@(
|
||||
$(
|
||||
@($HAConfigPath,'/srv/ha/current/homeassistant','/usr/share/hassio/homeassistant') | Where-Object { Test-Path -Type Container $_ } | Select-Object -First 1
|
||||
), '/srv/ha/current/homeassistant'
|
||||
) | Where-Object { $_ } | Select-Object -First 1 -OutVariable HAConfigPath
|
||||
@($HAConfigPath,'/srv/ha/current/homeassistant','/usr/share/hassio/homeassistant') |
|
||||
Where-Object { $_ } |
|
||||
Where-Object { Test-Path -Type Container $_ } |
|
||||
Select-Object -First 1
|
||||
), $HAConfigPath, '/srv/ha/current/homeassistant'
|
||||
) | Where-Object { $_ } |
|
||||
Select-Object -First 1 -OutVariable HAConfigPath
|
||||
|
|
|
@ -32,7 +32,7 @@ if( $MatchName ) {
|
|||
}
|
||||
|
||||
if( $MatchAny ) {
|
||||
$result = $result | Where-Object { $_ | Out-String | Where-Object { $_ -match $($MatchAny -join '|') } }
|
||||
$result = $result | Where-Object { $_ | Format-Table -Wrap -HideTableHeaders | Out-String | Where-Object { $_ -match $($MatchAny -join '|') } }
|
||||
}
|
||||
|
||||
if( $OrderBy ) {
|
||||
|
|
Loading…
Reference in New Issue