class Bundler::Source::Path::Installer
def generate_bin
def generate_bin return if spec.executables.nil? || spec.executables.empty? super if Bundler.requires_sudo? SharedHelpers.filesystem_access(@gem_bin_dir) do |p| Bundler.mkdir_p(p) end spec.executables.each do |exe| Bundler.sudo "cp -R #{@bin_dir}/#{exe} #{@gem_bin_dir}" end end ensure Bundler.rm_rf(@tmp_dir) if Bundler.requires_sudo? end