From 3d7c6fa10f17ae2b6dcc8f5469e61f8c2033eb56 Mon Sep 17 00:00:00 2001 From: Branch Vincent Date: Sat, 8 Feb 2025 09:09:52 -0800 Subject: [PATCH] utils/pypi: remove extra newline when updating resources --- Library/Homebrew/utils/pypi.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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?