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

Don't fail when cleanup fails #10379

Closed
joshka opened this issue Jan 21, 2021 · 0 comments · Fixed by #10389
Closed

Don't fail when cleanup fails #10379

joshka opened this issue Jan 21, 2021 · 0 comments · Fixed by #10389
Assignees
Labels
outdated PR was locked due to age

Comments

@joshka
Copy link
Contributor

joshka commented Jan 21, 2021

Feature suggestion

Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.

A detailed description of the proposed feature

Consider continuing rather than failing when brew cleanup fails. Report the errors at the end of the task rather than blocking completion.

The motivation for the feature

When running brew upgrade on a machine I hadn't touched in about a month, I was stopped 3 times due to an inability to remove an old openssl version:

Removing: /usr/local/Cellar/openssl/1.0.2q... (21 files, 8.4MB)
Error: Could not remove openssl keg! Do so manually:
  sudo rm -rf /usr/local/Cellar/openssl/1.0.2q
==> `brew cleanup` has not been run in 30 days, running now...
Removing: /usr/local/Cellar/openssl@1.1/1.1.1g... (8,073 files, 22MB)
Error: Could not remove openssl@1.1 keg! Do so manually:
  sudo rm -rf /usr/local/Cellar/openssl@1.1/1.1.1g
==> `brew cleanup` has not been run in 30 days, running now...
Removing: /usr/local/Cellar/openssl@1.1/1.1.1h... (8,081 files, 22.2MB)
Error: Could not remove openssl@1.1 keg! Do so manually:
  sudo rm -rf /usr/local/Cellar/openssl@1.1/1.1.1h

At this point, I ran brew cleanup manually rather than via upgrade, and got 3 more stop and try again errors. It would have been much easier to fix if I had the 3 rm commands to run in one step.

How the feature would be relevant to at least 90% of Homebrew users

Any user that hits multiple cleanups would require less manually running several commands to proceed.

What alternatives to the feature have been considered

Automatically allow for cleanups like this by just removing the files (something like brew cleanup --force to perform the sudo rm)

@MikeMcQuaid MikeMcQuaid self-assigned this Jan 21, 2021
@BrewTestBot BrewTestBot added the outdated PR was locked due to age label Feb 21, 2021
@Homebrew Homebrew locked as resolved and limited conversation to collaborators Feb 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants