diff options
| author | Misty De Meo | 2017-07-18 12:53:54 -0700 |
|---|---|---|
| committer | GitHub | 2017-07-18 12:53:54 -0700 |
| commit | f8300b2cb720ca0c25c6b8fbee2df84b5a210b2a (patch) | |
| tree | 9b439c569172d33dfd7f5dd725b9497a3ed11c26 /Library/Homebrew/extend | |
| parent | c6f8887deb892f9ad34cb70a97aa195d40b040e0 (diff) | |
| parent | 32b7e32856e61f256f2703faa17cdbcee26e17b7 (diff) | |
| download | brew-f8300b2cb720ca0c25c6b8fbee2df84b5a210b2a.tar.bz2 | |
Merge pull request #2883 from mistydemeo/allow_passing_hash_to_system
Allow passing hash to system
Diffstat (limited to 'Library/Homebrew/extend')
| -rw-r--r-- | Library/Homebrew/extend/fileutils.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Library/Homebrew/extend/fileutils.rb b/Library/Homebrew/extend/fileutils.rb index 287a1408f..52d4cbf51 100644 --- a/Library/Homebrew/extend/fileutils.rb +++ b/Library/Homebrew/extend/fileutils.rb @@ -111,10 +111,18 @@ module FileUtils # path to the actually-installed make on Tiger or older. def make(*args) if Utils.popen_read("/usr/bin/make", "--version").match(/Make (\d\.\d+)/)[1] > "3.80" - system "/usr/bin/make", *args + make_path = "/usr/bin/make" else make = Formula["make"].opt_bin/"make" make_path = make.exist? ? make.to_s : (Formula["make"].opt_bin/"gmake").to_s + end + + if superenv? + make_name = File.basename(make_path) + with_env "HOMEBREW_MAKE" => make_name do + system "make", *args + end + else system make_path, *args end end |
