mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
brew style --fix
This commit is contained in:
parent
992025dc1a
commit
63d8de3600
@ -56,7 +56,7 @@ module Cask
|
||||
message = "It seems there is already #{self.class.english_article} " \
|
||||
"#{self.class.english_name} at '#{target}'"
|
||||
|
||||
if force && target.symlink? && \
|
||||
if force && target.symlink? &&
|
||||
(target.realpath == source.realpath || target.realpath.to_s.start_with?("#{cask.caskroom_path}/"))
|
||||
opoo "#{message}; overwriting."
|
||||
target.delete
|
||||
|
@ -72,7 +72,7 @@ module Homebrew
|
||||
|
||||
ambiguous_casks = []
|
||||
if !args.formula? && !args.cask?
|
||||
ambiguous_casks = formulae_and_casks \
|
||||
ambiguous_casks = formulae_and_casks
|
||||
.group_by { |item| Livecheck.package_or_resource_name(item, full_name: true) }
|
||||
.values
|
||||
.select { |items| items.length > 1 }
|
||||
|
@ -182,7 +182,7 @@ module Homebrew
|
||||
|
||||
ambiguous_casks = []
|
||||
if handle_name_conflict
|
||||
ambiguous_casks = formulae_and_casks_to_check \
|
||||
ambiguous_casks = formulae_and_casks_to_check
|
||||
.group_by { |item| package_or_resource_name(item, full_name: true) }
|
||||
.values
|
||||
.select { |items| items.length > 1 }
|
||||
|
@ -360,14 +360,14 @@ class Migrator
|
||||
|
||||
# Remove `opt/oldname` link if it belongs to newname.
|
||||
def unlink_oldname_opt
|
||||
return unless old_opt_record
|
||||
return if old_opt_record.blank?
|
||||
return unless old_opt_record.symlink?
|
||||
return unless old_opt_record.exist?
|
||||
return unless new_linked_keg_record.exist?
|
||||
return if new_linked_keg_record.realpath != old_opt_record.realpath
|
||||
|
||||
if old_opt_record.symlink? && old_opt_record.exist? \
|
||||
&& new_linked_keg_record.exist? \
|
||||
&& new_linked_keg_record.realpath == old_opt_record.realpath
|
||||
old_opt_record.unlink
|
||||
old_opt_record.parent.rmdir_if_possible
|
||||
end
|
||||
old_opt_record.unlink
|
||||
old_opt_record.parent.rmdir_if_possible
|
||||
end
|
||||
|
||||
# Remove `Cellar/oldname` if it exists.
|
||||
|
@ -120,7 +120,7 @@ class SoftwareSpec
|
||||
end
|
||||
|
||||
def bottled?(tag = nil)
|
||||
bottle_tag?(tag) && \
|
||||
bottle_tag?(tag) &&
|
||||
(tag.present? || bottle_specification.compatible_locations? || owner.force_bottle)
|
||||
end
|
||||
|
||||
|
@ -236,7 +236,7 @@ describe SystemCommand do
|
||||
"-c",
|
||||
'printf "\r%s" "################### 27.6%" 1>&2',
|
||||
]
|
||||
end.to output( \
|
||||
end.to output(
|
||||
"\r################### 27.6%",
|
||||
).to_stderr
|
||||
end
|
||||
|
@ -155,7 +155,7 @@ describe PyPI do
|
||||
|
||||
describe "<=>" do
|
||||
it "returns -1" do
|
||||
expect(package <=> other_package).to eq((-1))
|
||||
expect(package <=> other_package).to eq(-1)
|
||||
end
|
||||
|
||||
it "returns 0" do
|
||||
|
Loading…
x
Reference in New Issue
Block a user