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

keg: correctly cleanup old aliases. #2923

Merged
merged 3 commits into from Jul 30, 2017

Conversation

MikeMcQuaid
Copy link
Member

@MikeMcQuaid MikeMcQuaid commented Jul 21, 2017

Cleanup old, versioned aliases and tap aliases folders when unlinking or uninstalling a keg.

Also:

  • Include aliases in the tab to allow e.g. brew switch to correctly handle switching between different keg’s aliases.
  • Ensure aliases don’t include full names (aliases that include /s end up creating directories and this is bad).

Fixes #2937

Aliases that include `/`s end up creating directories and this is bad.
Including aliases in the tab allows e.g. `brew switch` to correctly
handle switching between different keg’s aliases.
FileUtils.rm_rf bad_tap_opt if bad_tap_opt.directory?

Pathname.glob("#{opt_record}@*").each do |a|
next if aliases.include?(a.basename)
Copy link
Contributor

Choose a reason for hiding this comment

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

may want to skip if it's an alias for a different rack

Cleanup old, versioned aliases and tap aliases folders when unlinking
or uninstalling a keg.
@MikeMcQuaid MikeMcQuaid merged commit e8c4989 into Homebrew:master Jul 30, 2017
@MikeMcQuaid MikeMcQuaid deleted the alias-fixes branch July 30, 2017 15:02
@Homebrew Homebrew locked and limited conversation to collaborators May 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants