aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/language/python.rb
diff options
context:
space:
mode:
authorMike McQuaid2016-09-10 10:38:35 +0100
committerMike McQuaid2016-09-10 10:40:02 +0100
commit16be0f105ed3eef07133cdd09e48e562b85b7697 (patch)
tree31f7dfc9439e27604dffdbe53ed6a6cd22ffbba7 /Library/Homebrew/language/python.rb
parentbde8d69d6e1129530fa2bbe1e88cf88e350521af (diff)
downloadbrew-16be0f105ed3eef07133cdd09e48e562b85b7697.tar.bz2
language/python: fix Rubocop warnings.
Diffstat (limited to 'Library/Homebrew/language/python.rb')
-rw-r--r--Library/Homebrew/language/python.rb11
1 files changed, 5 insertions, 6 deletions
diff --git a/Library/Homebrew/language/python.rb b/Library/Homebrew/language/python.rb
index eb0675638..95259c841 100644
--- a/Library/Homebrew/language/python.rb
+++ b/Library/Homebrew/language/python.rb
@@ -187,12 +187,11 @@ module Language
# Robustify symlinks to survive python3 patch upgrades
@venv_root.find do |f|
next unless f.symlink?
- if (rp = f.realpath.to_s).start_with? HOMEBREW_CELLAR
- python = rp.include?("python3") ? "python3" : "python"
- new_target = rp.sub %r{#{HOMEBREW_CELLAR}/#{python}/[^/]+}, Formula[python].opt_prefix
- f.unlink
- f.make_symlink new_target
- end
+ next unless (rp = f.realpath.to_s).start_with? HOMEBREW_CELLAR
+ python = rp.include?("python3") ? "python3" : "python"
+ new_target = rp.sub %r{#{HOMEBREW_CELLAR}/#{python}/[^/]+}, Formula[python].opt_prefix
+ f.unlink
+ f.make_symlink new_target
end
end