Permalink
Browse files

using BUNDLE_WITHOUT env var isn't a good idea

  • Loading branch information...
1 parent 819e777 commit d15937054ecddde0a252536c6039ebd908822dd5 @hone hone committed Oct 18, 2011
Showing with 3 additions and 6 deletions.
  1. +3 −6 lib/language_pack/ruby.rb
@@ -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."
@@ -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

0 comments on commit d159370

Please sign in to comment.