mirror of
https://github.com/ansible/awx.git
synced 2024-10-28 02:25:27 +03:00
Fix case where Get-ChildItems does not return any results
This commit is contained in:
parent
8a8901afe4
commit
5098d0e99c
@ -25,7 +25,7 @@ if ([System.IntPtr]::Size -eq 4) {
|
||||
# This is a 32-bit Windows system, so we only check for 32-bit programs, which will be
|
||||
# at the native registry location.
|
||||
|
||||
$packages = Get-ChildItem -Path $uninstall_native_path |
|
||||
[PSObject []]$packages = Get-ChildItem -Path $uninstall_native_path |
|
||||
Get-ItemProperty |
|
||||
Select-Object -Property @{Name="name"; Expression={$_."DisplayName"}},
|
||||
@{Name="version"; Expression={$_."DisplayVersion"}},
|
||||
@ -38,7 +38,7 @@ if ([System.IntPtr]::Size -eq 4) {
|
||||
# This is a 64-bit Windows system, so we check for 64-bit programs in the native
|
||||
# registry location, and also for 32-bit programs under Wow6432Node.
|
||||
|
||||
$packages = Get-ChildItem -Path $uninstall_native_path |
|
||||
[PSObject []]$packages = Get-ChildItem -Path $uninstall_native_path |
|
||||
Get-ItemProperty |
|
||||
Select-Object -Property @{Name="name"; Expression={$_."DisplayName"}},
|
||||
@{Name="version"; Expression={$_."DisplayVersion"}},
|
||||
|
Loading…
Reference in New Issue
Block a user