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.
This commit is contained in:
		
							parent
							
								
									ed443cc7c7
								
							
						
					
					
						commit
						7e0e458dc2
					
				@ -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
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user