Skip to content
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

Flutter clean should use noExitOnFailure when deleting #108978

Open
zanderso opened this issue Aug 4, 2022 · 0 comments
Open

Flutter clean should use noExitOnFailure when deleting #108978

zanderso opened this issue Aug 4, 2022 · 0 comments
Labels
P2 Important issues not at the top of the work list team-tool Owned by Flutter Tool team tool Affects the "flutter" command-line tool. See also t: labels. triaged-tool Triaged by Flutter Tool team

Comments

@zanderso
Copy link
Member

zanderso commented Aug 4, 2022

Currently when deleting, the EHFS will throwToolExit eagerly when deletion fails due to an access error. However the implementation of the clean command has its own logic for handling a failure to delete. This means users will likely never see the potentially helpful message here: https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/commands/clean.dart#L113.

Instead of deletion is called under EHFS.noExitOnFailure, the EHFS will throw an Exception instead of throwToolExit, which can then be caught by the clean command, which can still print its own message.

An alternative would be to take the advice from the clean command and add it to the advice in the EHFS when deletion fails due to an access error on Windows.

cc @christopherfujino

@zanderso zanderso added tool Affects the "flutter" command-line tool. See also t: labels. P2 Important issues not at the top of the work list labels Aug 4, 2022
@flutter-triage-bot flutter-triage-bot bot added team-tool Owned by Flutter Tool team triaged-tool Triaged by Flutter Tool team labels Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Important issues not at the top of the work list team-tool Owned by Flutter Tool team tool Affects the "flutter" command-line tool. See also t: labels. triaged-tool Triaged by Flutter Tool team
Projects
None yet
Development

No branches or pull requests

1 participant