Skip to content

Commit bfb0a55

Browse files
authored
Merge pull request #20621 from Homebrew/audit-container-deps
cask/audit: fix install of container deps
2 parents 9da27e1 + dc28719 commit bfb0a55

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

Library/Homebrew/cask/audit.rb

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -622,15 +622,17 @@ def extract_artifacts(&_block)
622622
}.compact
623623

624624
Homebrew::Install.perform_preinstall_checks_once
625-
valid_formula_installers = Homebrew::Install.fetch_formulae(primary_container.dependencies)
626-
627-
primary_container.dependencies.each do |dep|
628-
next unless valid_formula_installers.include?(dep)
629-
630-
fi = FormulaInstaller.new(
625+
formula_installers = primary_container.dependencies.map do |dep|
626+
FormulaInstaller.new(
631627
dep,
632628
**install_options,
633629
)
630+
end
631+
valid_formula_installers = Homebrew::Install.fetch_formulae(formula_installers)
632+
633+
formula_installers.each do |fi|
634+
next unless valid_formula_installers.include?(fi)
635+
634636
fi.install
635637
fi.finish
636638
end

0 commit comments

Comments
 (0)