Skip to content
Snippets Groups Projects
Unverified Commit 7e0e458d authored by Mike McQuaid's avatar Mike McQuaid
Browse files

dev-cmd/pr-pull: fail on syntax errors.

This logic was pulled over from `brew pull` where it made sense (as we
wanted to be able to pull broken commits) but doesn't really apply here
where we can easily end up ignoring broken formulae and pushing their
commits anyway.
parent ed443cc7
No related branches found
No related tags found
No related merge requests found
......@@ -178,16 +178,12 @@ module Homebrew
Utils.popen_read("git", "-C", tap.path, "diff-tree",
"-r", "--name-only", "--diff-filter=AM",
original_commit, "HEAD", "--", tap.formula_dir)
.lines.map do |line|
.lines
.map do |line|
next unless line.end_with? ".rb\n"
name = "#{tap.name}/#{File.basename(line.chomp, ".rb")}"
begin
Formula[name]
rescue Exception # rubocop:disable Lint/RescueException
# Make sure we catch syntax errors.
next
end
Formula[name]
end.compact
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment