Skip to content
Snippets Groups Projects
Commit a70f8b9c authored by Mike McQuaid's avatar Mike McQuaid Committed by GitHub
Browse files

Merge pull request #911 from MikeMcQuaid/language-rubocop

Fix Library/Homebrew/language RuboCop warnings
parents 984e80a7 ba852444
No related branches found
No related tags found
No related merge requests found
......@@ -72,7 +72,7 @@ module Language
end
def install_cabal_package(*args)
options = if args[-1].kind_of?(Hash) then args.pop else {} end
options = args[-1].is_a?(Hash) ? args.pop : {}
cabal_sandbox do
cabal_install_tools(*options[:using]) if options[:using]
......
......@@ -21,7 +21,7 @@ module Language
setup_npm_environment
# tell npm to not install .brew_home by adding it to the .npmignore file
# (or creating a new one if no .npmignore file already exists)
open(".npmignore", "a") { |f| f.write( "\n.brew_home\n") }
open(".npmignore", "a") { |f| f.write("\n.brew_home\n") }
# npm install args for global style module format installed into libexec
["--verbose", "--global", "--prefix=#{libexec}", "."]
end
......
......@@ -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
......
PYTHON_VIRTUALENV_URL = "https://files.pythonhosted.org/packages/5c/79/5dae7494b9f5ed061cff9a8ab8d6e1f02db352f3facf907d9eb614fb80e9/virtualenv-15.0.2.tar.gz"
PYTHON_VIRTUALENV_SHA256 = "fab40f32d9ad298fba04a260f3073505a16d52539a84843cf8c8369d4fd17167"
PYTHON_VIRTUALENV_URL = "https://files.pythonhosted.org/packages/5c/79/5dae7494b9f5ed061cff9a8ab8d6e1f02db352f3facf907d9eb614fb80e9/virtualenv-15.0.2.tar.gz".freeze
PYTHON_VIRTUALENV_SHA256 = "fab40f32d9ad298fba04a260f3073505a16d52539a84843cf8c8369d4fd17167".freeze
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment