Fix error when using Get-ChildItem c: - #7033
Conversation
|
Sergey Vasin (@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 Ilya (@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? |
|
Christoph Bergmeister (@bergmeister) Do you mean a problem only with CIs (not local)? |
|
Ilya (@iSazonov) I mean the |
|
Sergey Vasin (@sethvs) After fixing current test failures in New-Item.Tests.ps1, please do a [feature] commit as Christoph Bergmeister (@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. |
|
Update-Help and PowerShellGet tests fail. |
|
Sergey Vasin (@sethvs) Please look #6149 - perhaps we could fix it too. |
|
Ilya (@iSazonov) OK, will take a look. |
|
Aditya Patwardhan (@adityapatwardhan) Ilya (@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. |
|
Sergey Vasin (@sethvs) it seems that #7048 is fixed in preview.3 |
|
Rob Holt (@rjmholt) Can you have a look too? |
|
Aditya Patwardhan (@adityapatwardhan) No, it is not fixed. |
Ilya (iSazonov)
left a comment
There was a problem hiding this comment.
Leave a comment
Rob Holt (rjmholt)
left a comment
There was a problem hiding this comment.
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.
Might be worth hanging a line for the second path check.
There was a problem hiding this comment.
Agree, done.
Rob Holt (rjmholt)
left a comment
There was a problem hiding this comment.
Ok, I've put this branch through a test run and got no unusual failures. This looks good to me!
* Fix error when using Get-ChildItem c: * Fix New-Item test issue. * Add tests for Get-ChildItem cmdlet. * Add tests for New-Item cmdlet. * Fix tests for New-Item cmdlet.
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