-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Fix error when using Get-ChildItem c: #7033
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
Conversation
|
@sethvs Please push an empty commit to trigger another build since there seemed to be a sporadic problem that caused the build to hang and timeout. You could do this for example as follows, I recommend putting @iSazonov This happened to me last week as well that a build got into a hanging state. Have you see that before as well or is this probably caused by a recently added test? |
|
@bergmeister Do you mean a problem only with CIs (not local)? |
|
@iSazonov I mean the |
|
@sethvs After fixing current test failures in New-Item.Tests.ps1, please do a [feature] commit as @bergmeister suggested. Those namespaces APIs is a very fragile piece of code; so we need to run as many tests as we can to ensure that nothing gets broken by these changes. |
|
@anmenaga OK. |
|
Update-Help and PowerShellGet tests fail. |
|
@iSazonov OK, will take a look. |
|
@adityapatwardhan @iSazonov I'm afraid I can't allocate much time at the moment. So let's split fixing #6149 to another PR in order not to delay this one. I'm going to address it later. |
|
Empty commit to restart tests. |
|
@rjmholt Can you have a look too? |
|
@adityapatwardhan No, it is not fixed. |
iSazonov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leave a comment
rjmholt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going to build this branch and have a look at it, but it looks good so far.
| { | ||
| PSTraceSource.NewArgumentNullException("paths"); | ||
| } | ||
| else if (path.EndsWith((":" + Path.DirectorySeparatorChar), StringComparison.Ordinal) || path.EndsWith((":" + Path.AltDirectorySeparatorChar), StringComparison.Ordinal)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth hanging a line for the second path check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, done.
rjmholt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I've put this branch through a test run and got no unusual failures. This looks good to me!
PR Summary
Fix #7032, #7048
Get-ChildItem c: throws an error. #7032
When creating file using -Path c: without a backslash, file created in the drive root and not in the current folder. #7048
Windows PowerShell 5.1: file is created in current path - C:\Folder
PowerShell Core 6.0.2: file is created in current path - C:\Folder
PowerShell Core 6.1.0-preview.2: file is created in current path - C:\Folder
PowerShell Core 6.1.0-preview.3: file is created in root path - C:\
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