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
New-Item: When creating symbolic links (symlinks) / reparse points, the -Target path should always be treated as a *literal* path #13136
Comments
@PowerShell/powershell-committee agrees that |
could you add a couple of actual examples please? |
@mklement0 Please update title and description to follow "always". |
@iSazonov, done. |
@mklement0 Are you ready to pull the fix? I'd review... |
@iSazonov, given that you're already familiar with that area of the code, how about we swap these roles? 😁 |
@mklement0 In the case we can not merge :-( without MSFT team but they are busy. |
Since I'm not familiar with the procedures: Are you saying that if you create the PR yourself, you cannot also merge it, but if I create it, you could? Wouldn't that mean that #13082 is also blocked until a maintainer has time to review and merge? |
Yes, I can not merge my commit without anybody approve it. (It is good policy.) So I ask community members to pull PRs so that I can review and merge a community contribution if it is simple and well covered by tests without waiting MSFT experts. |
@iSazonov What's the status of this now? It's blocking people again and again. |
@huoyaoyuan We haven't enough contributors and code reviewers in the project. |
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you. |
2 similar comments
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you. |
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you. |
I can try to contribute if there is a clear decision. |
This issue has been marked as "No Activity" as there has been no activity for 6 months. It has been closed for housekeeping purposes. |
Note:
This is technically a breaking change, but one that to me falls into Bucket 3: Unlikely Grey Area.
We've recently made an analogous change to
Invoke-WebRequest
/Invoke-RestMethod
, which now sensibly interpret their-OutFile
argument invariably as a literal path - see Make-OutFile
param in web cmdlets to work like -LiteralPath #11701Summary of the new feature/enhancement
When you create a symlink or reparse point, you want to target a specific, literal target path - you're not looking for this path to determined via wildcard-pattern matching, which, however, is what currently happens: a
-Target
(-Value
) argument is (invariably) interpreted as a wildcard pattern. What makes the behavior even less useful is that the pattern must resolve to exactly one path.Interpreting the
-Target
(-Value
) argument as a wildcard expression means that meant-to-be-literal paths such as[a].txt
would mistakenly targeta.txt
, if present, for instance.Also, as a potentially unwanted side effect, if the
-Target
(-Value
) is determined via wildcard resolution, a relative input path (pattern) is invariably resolved to a full path.The sensible behavior is to always treat the
-Target
(-Value
) argument as a literal path (and to preserve its relative-vs.-full path status, as specified).Once the change is implemented, the following tests - which currently fail - should succeed:
The tests currently fail, because
file[1]
is interpreted as a wildcard pattern that happens to matchfile1
.The text was updated successfully, but these errors were encountered: