Flutter clean should use noExitOnFailure when deleting #108978
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
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 ofthrowToolExit
, 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
The text was updated successfully, but these errors were encountered: