From d6a94eb4528e900fa0dd7a2c4309eb5cbeeb3ef6 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sat, 30 Nov 2013 19:38:48 -0600 Subject: Skip path replacement when it would be a no-op --- Library/Homebrew/keg_fix_install_names.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'Library/Homebrew') diff --git a/Library/Homebrew/keg_fix_install_names.rb b/Library/Homebrew/keg_fix_install_names.rb index e60ba72f1..2d79e9180 100644 --- a/Library/Homebrew/keg_fix_install_names.rb +++ b/Library/Homebrew/keg_fix_install_names.rb @@ -64,6 +64,7 @@ class Keg # some_variable="/opt/homebrew/Cellar/foo/1.0/lib" # and add quotes to protect against paths containing spaces. def replace_pkgconfig_file_path(s, old, new) + return if old == new s.gsub!(%r[([\S]+)="?#{Regexp.escape(old)}(.*?)"?$], "\\1=\"#{new}\\2\"") end -- cgit v1.2.3