Skip to content

Commit

Permalink
Remove deprecated Formula#plist references
Browse files Browse the repository at this point in the history
This was deprecated recently in Homebrew/brew#17233
so it needed to be removed here too. It caused the `rake test:service-diff`
command to fail.
  • Loading branch information
apainintheneck committed May 11, 2024
1 parent ee35303 commit 23f6279
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions lib/diff-scripts/service_diff.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
when "formula"
[Formulary.factory(COMMAND_ARG)]
end
.select { |f| f.service? || f.plist }
.select(&:service?)
.freeze

FORMULA_FILES = FORMULAE.map(&:path).freeze
Expand Down Expand Up @@ -68,14 +68,9 @@
Homebrew::SimulateSystem.with(os: :macos) do
FORMULA_FILES.each do |formula_file|
formula = Formulary.factory(formula_file)
next unless formula.service.command?

service_content =
if formula.service.command?
formula.service.to_plist
elsif formula.plist
formula.plist
end

service_content = formula.service.to_plist
next if service_content.nil?

outfile = MACOS_DIR/"#{formula.plist_name}.plist"
Expand Down Expand Up @@ -129,14 +124,9 @@ def self.all_formulae
Homebrew::SimulateSystem.with(os: :macos) do
CORE_FORMULAE_NAMES.each do |formula_name|
formula = Formulary::FromAPILoader.new(formula_name).get_formula(:stable)
next unless formula.service.command?

service_content =
if formula.service.command?
formula.service.to_plist
elsif formula.plist
formula.plist
end

service_content = formula.service.to_plist
next if service_content.nil?

outfile = MACOS_API_DIR/"#{formula.plist_name}.plist"
Expand Down

0 comments on commit 23f6279

Please sign in to comment.