Invoke-Item.Tests.ps1 handles finding multiple ping executables. (#6120)

Invoke-Item.Tests.ps1 handles finding multiple ping executables.

Fixes Issue #5220
This commit is contained in:
Klaudia Algiz 2018-02-13 17:01:24 -08:00 committed by Travis Plunk
parent c1c5344a88
commit d6e978f82a

View file

@ -53,7 +53,8 @@ Describe "Invoke-Item basic tests" -Tags "Feature" {
}
It "Should invoke an executable file without error" {
$ping = Get-Command "ping" -CommandType Application | ForEach-Object Source
# In case there is a couple of ping executables, we take the first one.
$ping = (Get-Command "ping" -CommandType Application | Select-Object -First 1).Source
$redirectFile = Join-Path -Path $TestDrive -ChildPath "redirect2.txt"
if ($IsWindows) {