summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2010-07-11 17:08:25 -0300
committerSantiago Pastorino <santiago@wyeworks.com>2010-07-12 16:48:51 -0300
commitb81ec4e5e252d43452b0994a0e92a813cfcc93e4 (patch)
treef6c2088bce946bab090e8abe1a6a8a97c27461fb
parent90a29272510178b1531b352843d600af4836462f (diff)
downloadbundler-b81ec4e5e252d43452b0994a0e92a813cfcc93e4.tar.gz
Don't add bin_dir if there are no executables
-rw-r--r--lib/bundler/source.rb13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/bundler/source.rb b/lib/bundler/source.rb
index 970a7dc77f..64c6052ef3 100644
--- a/lib/bundler/source.rb
+++ b/lib/bundler/source.rb
@@ -86,12 +86,13 @@ module Bundler
Bundler.ui.info "Installing #{spec.name} (#{spec.version}) "
install_path = Bundler.requires_sudo? ? Bundler.tmp : Gem.dir
- installer = Gem::Installer.new path,
- :install_dir => install_path,
- :ignore_dependencies => true,
- :wrappers => true,
- :env_shebang => true,
- :bin_dir => "#{install_path}/bin"
+ options = { :install_dir => install_path,
+ :ignore_dependencies => true,
+ :wrappers => true,
+ :env_shebang => true }
+ options.merge!(:bin_dir => "#{install_path}/bin") unless spec.executables.nil? || spec.executables.empty?
+
+ installer = Gem::Installer.new path, options
installer.install
# SUDO HAX