Skip to content

Commit

Permalink
read user ENV settings for both user-env-compile or buildpack-env-arg
Browse files Browse the repository at this point in the history
  • Loading branch information
hone authored and schneems committed Feb 5, 2014
1 parent 0f18299 commit 7203ca0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/language_pack/ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ def bundler_binstubs_path
def build_bundler
instrument 'ruby.build_bundler' do
log("bundle") do
bundle_without = ENV["BUNDLE_WITHOUT"] || "development:test"
bundle_without = env("BUNDLE_WITHOUT") || "development:test"
bundle_bin = "bundle"
bundle_command = "#{bundle_bin} install --without #{bundle_without} --path vendor/bundle --binstubs #{bundler_binstubs_path}"
bundle_command << " -j4"
Expand Down
4 changes: 4 additions & 0 deletions lib/language_pack/shell_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ def user_env_hash
@@user_env_hash
end

def env(var)
ENV[var] || user_env_hash[var]
end

def self.blacklist?(key)
%w(PATH GEM_PATH GEM_HOME GIT_DIR).include?(key)
end
Expand Down

0 comments on commit 7203ca0

Please sign in to comment.