diff options
| author | Mislav Marohnić | 2012-07-06 10:37:57 +0200 |
|---|---|---|
| committer | Adam Vandenberg | 2012-07-06 20:56:20 -0700 |
| commit | 660d58e18ac53d554178e1792e000b881eafe05c (patch) | |
| tree | cddc174acaeb743d2660b34bac9ed98591dd942f /Library/Formula | |
| parent | 1a996d893221bc271a4ded1b045514b26faee87f (diff) | |
| download | homebrew-660d58e18ac53d554178e1792e000b881eafe05c.tar.bz2 | |
hub: use system rake to avoid RVM's Bundler integration
Fixes defunkt/hub#205
Closes #13238.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/hub.rb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Library/Formula/hub.rb b/Library/Formula/hub.rb index e3b04955f..a091afc7d 100644 --- a/Library/Formula/hub.rb +++ b/Library/Formula/hub.rb @@ -7,11 +7,22 @@ class Hub < Formula md5 'd3ff9bcf489466a408020867b77f1d4d' def install - system "rake", "install", "prefix=#{prefix}" + system rake_bin, "install", "prefix=#{prefix}" (prefix+'etc/bash_completion.d').install 'etc/hub.bash_completion.sh' (share+'zsh/site-functions').install 'etc/hub.zsh_completion' => '_hub' end + def rake_bin + require 'rbconfig' + ruby_rake = File.join RbConfig::CONFIG['bindir'], 'rake' + + if File.exist? ruby_rake + ruby_rake + else + '/usr/bin/rake' + end + end + def caveats; <<-EOS.undent Bash completion has been installed to: #{etc}/bash_completion.d |
