aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2015-03-05 20:39:53 -0500
committerJack Nagel2015-03-05 20:39:57 -0500
commita60f0d58ce77a6b87424f084e6d0f8d7a9b1560c (patch)
treea41a094a245106631f225f27304c089b360f9004 /Library
parent6032387b7e767a4675ccb803c2ebd400ab098dee (diff)
downloadhomebrew-a60f0d58ce77a6b87424f084e6d0f8d7a9b1560c.tar.bz2
Use env DSL
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/mkvtoolnix.rb6
-rw-r--r--Library/Homebrew/requirements/python_dependency.rb2
2 files changed, 3 insertions, 5 deletions
diff --git a/Library/Formula/mkvtoolnix.rb b/Library/Formula/mkvtoolnix.rb
index 12d3ad772..8080059c0 100644
--- a/Library/Formula/mkvtoolnix.rb
+++ b/Library/Formula/mkvtoolnix.rb
@@ -9,10 +9,8 @@ class Ruby19 < Requirement
Version.new(version.to_s) >= Version.new("1.9")
end
- def modify_build_environment
- ruby = which "ruby"
- return unless ruby
- ENV.prepend_path "PATH", ruby.dirname
+ env do
+ ENV.prepend_path "PATH", which("ruby").dirname
end
def message; <<-EOS.undent
diff --git a/Library/Homebrew/requirements/python_dependency.rb b/Library/Homebrew/requirements/python_dependency.rb
index 1db0bc811..750db6c53 100644
--- a/Library/Homebrew/requirements/python_dependency.rb
+++ b/Library/Homebrew/requirements/python_dependency.rb
@@ -18,7 +18,7 @@ class PythonDependency < Requirement
build? || system_python?
end
- def modify_build_environment
+ env do
if system_python?
if python_binary == "python"
version = python_short_version