Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Merged
daxian-dbw merged 1 commit into
PowerShell:masterPowerShell/PowerShell:masterfrom
SteveL-MSFT:get-literalpathSteveL-MSFT/PowerShell:get-literalpathCopy head branch name to clipboard
Oct 26, 2017
Merged

fix get-item -literalpath a*b if a*b doesn't actually exist to return error#5197
daxian-dbw merged 1 commit into
PowerShell:masterPowerShell/PowerShell:masterfrom
SteveL-MSFT:get-literalpathSteveL-MSFT/PowerShell:get-literalpathCopy head branch name to clipboard

Conversation

@SteveL-MSFT

Copy link
Copy Markdown
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.