Fix Set-Location to only use filesystem directory (if exists) only if using FileSystem provider#6654
Fix Set-Location to only use filesystem directory (if exists) only if using FileSystem provider#6654SteveL-MSFT wants to merge 2 commits intoPowerShell:masterfrom
Set-Location to only use filesystem directory (if exists) only if using FileSystem provider#6654Conversation
… with filesystem provider
Set-Location to only use filesystem directory (if exists) only if using FileSystem provider
What is the PR? Please add a link in the PR description. |
|
@iSazonov added link to previous PR in description |
|
@SteveL-MSFT Thanks! Maybe we need use Context.SessionState.Path.GetUnresolvedProviderPathFromPSPath(path);to be provider aware? We use this for |
|
@iSazonov not sure I understand how to apply that to this issue. In this case, the previous change was to treat a filesystem path as literal if it exists rather than trying to glob. However, it did this regardless of provider, but it was specifically for the filesystem. |
|
@SteveL-MSFT I guess the Issue occurs because we have not used right API. |
|
@SteveL-MSFT Could you continue the PR? |
|
This PR has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed if no further activity occurs within 10 days. |
|
@iSazonov I'm reverting the original change this PR depends on so this PR is no longer relevant. I'll probably keep the test case and submit it as a separate PR as that is still relevant. |
PR Summary
While working on getting the Cert provider working on non-Windows. I noticed that a fix I added
previously made the assumption that it was being used only by the FileSystem provider. Fix is to
add check that it is being used by FileSystem provider before checking if the directory exists
on the file system.
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:to the beginning of the title and remove the prefix when the PR is ready.[feature]if the change is significant or affects feature tests