Skip to content

Commit 987805d

Browse files
authored
Merge pull request #3644 from MikeMcQuaid/upgrade-skip-failed-reqs
upgrade: skip formula if upgrade fails due to unsatisfied requirement.
2 parents 13998f5 + dbeebca commit 987805d

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

Library/Homebrew/cmd/upgrade.rb

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,14 @@ def upgrade
8989

9090
formulae_to_install.each do |f|
9191
Migrator.migrate_if_needed(f)
92-
upgrade_formula(f)
93-
next unless ARGV.include?("--cleanup")
94-
next unless f.installed?
95-
Homebrew::Cleanup.cleanup_formula f
92+
begin
93+
upgrade_formula(f)
94+
next unless ARGV.include?("--cleanup")
95+
next unless f.installed?
96+
Homebrew::Cleanup.cleanup_formula f
97+
rescue UnsatisfiedRequirements => e
98+
onoe "#{f}: #{e}"
99+
end
96100
end
97101
end
98102

0 commit comments

Comments
 (0)