diff --git a/Library/Homebrew/utils/pypi.rb b/Library/Homebrew/utils/pypi.rb index 41bdaa4f2c..d8920b3d75 100644 --- a/Library/Homebrew/utils/pypi.rb +++ b/Library/Homebrew/utils/pypi.rb @@ -401,7 +401,8 @@ module PyPI end end - resource_section = "#{package_errors}\n#{new_resource_blocks}" + package_errors += "\n" if package_errors.present? + resource_section = "#{package_errors}#{new_resource_blocks}" odie "Excluded superfluous packages: #{exclude_packages.join(", ")}" if exclude_packages.any?