mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
uninstall: style suggestions
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
3dad44c9f3
commit
2f10b1cd6e
@ -72,12 +72,12 @@ module Homebrew
|
||||
maybe_paths = maybe_paths.reject do |path|
|
||||
# Remove extension only if a file
|
||||
# (f.e. directory with name "openssl@1.1" will be trimmed to "openssl@1")
|
||||
filename = if File.directory?(path)
|
||||
basename = if File.directory?(path)
|
||||
File.basename(path)
|
||||
else
|
||||
File.basename(path, ".*")
|
||||
end
|
||||
excluded_names.include?(filename)
|
||||
excluded_names.include?(basename)
|
||||
end
|
||||
maybe_paths -= paths if paths.present?
|
||||
if maybe_paths.present?
|
||||
|
Loading…
x
Reference in New Issue
Block a user