Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
using BUNDLE_WITHOUT env var isn't a good idea
  • Loading branch information
hone committed Oct 18, 2011
1 parent 819e777 commit d159370
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions lib/language_pack/ruby.rb
Expand Up @@ -133,10 +133,8 @@ def install_libyaml(dir)
# runs bundler to install the dependencies
def build_bundler
log("bundle") do
bundle_without_set = ENV["BUNDLE_WITHOUT"]
ENV["BUNDLE_WITHOUT"] ||= "development:test"
bundle_command = "bundle install --path vendor/bundle"
bundle_command += " --without development:test" unless bundle_without_set
bundle_without = ENV["BUNDLE_WITHOUT"] || "development:test"
bundle_command = "bundle install --without #{bundle_without} --path vendor/bundle"

unless File.exist?("Gemfile.lock")
error "Gemfile.lock is required. Please run \"bundle install\" locally\nand commit your Gemfile.lock."
Expand Down Expand Up @@ -167,8 +165,7 @@ def build_bundler
# we need to set BUNDLE_CONFIG and BUNDLE_GEMFILE for
# codon since it uses bundler.
env_vars = "env BUNDLE_GEMFILE=#{pwd}/Gemfile BUNDLE_CONFIG=#{pwd}/.bundle/config CPATH=#{yaml_include}:$CPATH CPPATH=#{yaml_include}:$CPPATH LIBRARY_PATH=#{yaml_lib}:$LIBRARY_PATH"
running_output = bundle_without_set ? "env BUNDLE_WITHOUT=#{ENV["BUNDLE_WITHOUT"]} #{bundle_command}" : bundle_command
puts "Running: #{running_output}"
puts "Running: #{bundle_command}"
pipe("#{env_vars} #{bundle_command} --no-clean 2>&1")
end

Expand Down

0 comments on commit d159370

Please sign in to comment.