Skip to content

Latest commit

 

History

History

v5-LiteralPath-Recurse-ignores-Include

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Get-ChildItem -LiteralPath -Recurse ignores -Include

(Affected versions: v2, v5 - v6.0.2, Fixed in v6.1.0)

This command (see Test-1.Path.ps1)

    Get-ChildItem -Path $PSHOME -Include *.exe -Recurse

gets expected powershell.exe and powershell_ise.exe.

The same command with -LiteralPath instead of -Path (see Test-2.LiteralPath.ps1)

    Get-ChildItem -LiteralPath $PSHOME -Include *.exe -Recurse

in PowerShell v5 unexpectedly gets all items in $PSHOME.

It looks like PowerShell.exe -Version 2 shows the same issue.