Navigation Menu

Skip to content

Commit

Permalink
simplify the env_shebang check, update #19
Browse files Browse the repository at this point in the history
  • Loading branch information
mpapis committed May 15, 2012
1 parent 1bc8f1a commit ed592d7
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/rubygems-bundler/rubygems_bundler_installer.rb
Expand Up @@ -24,11 +24,7 @@ def self.bundler_generate_bin(inst)

def self.shebang(inst, bin_file_name)
# options were defined first in 1.5, we want to support back to 1.3.7
options_supported = inst.respond_to?('options') && inst.options
if (options_supported && inst.options[:env_shebang]) || inst.instance_variable_get(:@env_shebang)
ruby_name = Gem::ConfigMap[:ruby_install_name]
end

ruby_name = Gem::ConfigMap[:ruby_install_name] if inst.instance_variable_get(:@env_shebang)
bindir = inst.bin_dir ? inst.bin_dir : Gem.bindir(inst.gem_home)
path = File.join bindir, inst.formatted_program_filename(bin_file_name)
first_line = File.open(path, "rb") {|file| file.gets}
Expand Down

0 comments on commit ed592d7

Please sign in to comment.