GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Make Move-Item work with its -Include, -Exclude, and -Filter parameters by jeffbi · Pull Request #3878 · PowerShell/PowerShell ConversationFixed #2385 Invoke the correct overload of SessionState.Path.GetResolvedPSPathFromPSPath, passing the cmdlet context object.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions…rs (#2385) Invoke the correct overload of SessionState.Path.GetResolvedPSPathFromPSPath, passing the cmdlet context object.
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
|
There was an error while loading. Please reload this page.
|
jeffbi I see the same in other PRs. Nightly builds is affected too. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Original Issue say that the cmdlet works well but writes unexpected error message - I don't see the check in tests.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Ilya (@iSazonov) Well, what it actually said what that the cmdlet successfully performed the action that was intended, then wrote an error. That's not quite the same as it worked well. I've updated the tests to check that the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
LGTM. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| $booContent = "boo content" | ||
| } | ||
| BeforeEach { | ||
| New-Item -ItemType Directory -Path $filterPath |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Should be
New-Item -ItemType Directory -Path $filterPath | Out-Null
to avoid on console output of created item
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| It "Can move to different directory, filtered with -Include" { | ||
| Move-Item -Path $filePath -Destination $moveToPath -Include "bar*" | ||
| $? | Should Be $true | ||
| Test-Path -Path $barPath | Should Be $false |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Use Powershell $barPath | Should Not Exist"
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Fixed
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| } | ||
| It "Can move to different directory, filtered with -Include" { | ||
| Move-Item -Path $filePath -Destination $moveToPath -Include "bar*" | ||
| $? | Should Be $true |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Difficult to debug from logs. Instead use
Move-Item -Path $filePath -Destination $moveToPath -Include "bar*" -ErrorVariable e -ErrorAction SilentlyContinue $e | Should BeNullOrEmpty
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Fixed
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| It "Can move to different directory, filtered with -Include" { | ||
| Move-Item -Path $filePath -Destination $moveToPath -Include "bar*" -ErrorVariable e -ErrorAction SilentlyContinue | ||
| $e | Should BeNullOrEmpty | ||
| #Test-Path -Path $barPath | Should Be $false |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Please remove the comment.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching that. Fixed.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
jeffbi Thanks for the fix! LGTM. (After removing one unneeded comment) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Ilya (@iSazonov), Aditya Patwardhan (@adityapatwardhan) Thanks for the review. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
jeffbi Can you update or remove the company in your profile? If it is accurate, please email me internally about additional steps you need to take. Aditya Patwardhan (@adityapatwardhan) Please make your Microsoft Organization membership public. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…rs (PowerShell#3878) * Make Move-Item work with its -Include, -Exclude, and -Filter parameters (PowerShell#2385) Invoke the correct overload of SessionState.Path.GetResolvedPSPathFromPSPath, passing the cmdlet context object. * Update tests per code review. * Changes per code review. * Remove stray comment
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.