8000 Add back `Clear-RecycleBin` for Windows by SteveL-MSFT · Pull Request #10909 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@SteveL-MSFT
Copy link
Member
@SteveL-MSFT SteveL-MSFT commented Oct 27, 2019

PR Summary

Add back Clear-RecycleBin cmdlet for Windows for parity with Windows PowerShell. Addressed misuse of GetLastError() by removing error handling since the API returns error only if recycle bin is empty already which is not useful for this cmdlet.

PR Context

FIx #6743

PR Checklist

Copy link
Collaborator
@iSazonov iSazonov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see we can not create tests but maybe it makes sense to add pending dump test to clearly show that we know about it?

@SteveL-MSFT
Copy link
Member Author
SteveL-MSFT commented Oct 27, 2019
8000

It's part of the default cmdlets tests verifying it exists on Windows, but not Linux/macOS. Eventually, we want to investigate all pending tests and not have them pending.

@iSazonov iSazonov added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Oct 28, 2019
@iSazonov iSazonov added this to the 7.0.0-preview.6 milestone Oct 28, 2019
@iSazonov iSazonov merged commit ca1b6fb into PowerShell:master Oct 28, 2019
@SteveL-MSFT SteveL-MSFT deleted the clear-recyclebin branch October 28, 2019 03:28
sdwheeler added a commit to sdwheeler/PowerShell that referenced this pull request Oct 28, 2019
sdwheeler added a commit to sdwheeler/PowerShell that referenced this pull request Oct 28, 2019
@TravisEz13
Copy link
Member

I looked at emptying the macOS trash

dir ~/.Trash/ -Recurse -Directory  -Filter *.app | Remove-Item -Force -Recurse
dir ~/.Trash/* -Recurse -File | remove-item -Force

Some items the normal user doesn't have permissions to.

@ghost
Copy link
ghost commented Nov 21, 2019

🎉v7.0.0-preview.6 has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Misuse of SHEmptyRecycleBin in Clear-RecycleBin cmdlet

3 participants

0