Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix get-item -literalpath a*b if a*b doesn't actually exist to return error #5197

Merged
merged 1 commit into from
Oct 26, 2017

Conversation

SteveL-MSFT
Copy link
Member

Previously, -literalpath given a wildcard will treat it the same as -path and if the wildcard found no files, it would silently exit. Correct behavior should be that -literalpath is literal so if the file doesn't exist, it should error. Fix is to also see if wildcard is being suppressed.

Also re-enabled and fixed some tests that were skipped incorrectly (should have been pending) since the issue was addressed.

Fix #5057

@SteveL-MSFT SteveL-MSFT added the Breaking-Change breaking change that may affect users label Oct 22, 2017
@daxian-dbw daxian-dbw self-assigned this Oct 23, 2017
@daxian-dbw daxian-dbw merged commit 7407a9e into PowerShell:master Oct 26, 2017
@SteveL-MSFT SteveL-MSFT deleted the get-literalpath branch October 26, 2017 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking-Change breaking change that may affect users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Get-Item -LiteralPath with FileSystem should fail on paths with wildcards
2 participants