summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBundlerbot <bot@bundler.io>2019-08-23 07:26:38 +0000
committerBundlerbot <bot@bundler.io>2019-08-23 07:26:38 +0000
commit31414dd7768d6492b5174a349cbf0ab5c12c9989 (patch)
tree9fa29596eeeb0c2545bb0544a3a5ce4fedef8988 /lib
parent3e6afa55fc064ba1397a780dd863c3f2e85df63e (diff)
parentade9d38d4c4487de838198a7980753cbacc1fef3 (diff)
downloadbundler-31414dd7768d6492b5174a349cbf0ab5c12c9989.tar.gz
Merge #7324
7324: Remove `:ruby_core` tag for ruby core r=hsbt a=hsbt This pull request is backported from https://github.com/ruby/ruby/pull/2380 Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/gem_helper.rb12
-rw-r--r--lib/bundler/shared_helpers.rb2
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/bundler/gem_helper.rb b/lib/bundler/gem_helper.rb
index 68f5e636ff..d00c1894a8 100644
--- a/lib/bundler/gem_helper.rb
+++ b/lib/bundler/gem_helper.rb
@@ -75,8 +75,8 @@ module Bundler
def build_gem
file_name = nil
- gem = ENV["BUNDLE_GEM"] ? ENV["BUNDLE_GEM"] : "gem"
- sh(%W[#{gem} build -V #{spec_path}]) do
+ gem = ENV["GEM_COMMAND"] ? ENV["GEM_COMMAND"] : "gem"
+ sh("#{gem} build -V #{spec_path}".shellsplit) do
file_name = File.basename(built_gem_path)
SharedHelpers.filesystem_access(File.join(base, "pkg")) {|p| FileUtils.mkdir_p(p) }
FileUtils.mv(built_gem_path, "pkg")
@@ -87,10 +87,10 @@ module Bundler
def install_gem(built_gem_path = nil, local = false)
built_gem_path ||= build_gem
- gem = ENV["BUNDLE_GEM"] ? ENV["BUNDLE_GEM"] : "gem"
- cmd = %W[#{gem} install #{built_gem_path}]
- cmd << "--local" if local
- out, status = sh_with_status(cmd)
+ gem = ENV["GEM_COMMAND"] ? ENV["GEM_COMMAND"] : "gem"
+ cmd = "#{gem} install #{built_gem_path}"
+ cmd += " --local" if local
+ out, status = sh_with_status(cmd.shellsplit)
unless status.success? && out[/Successfully installed/]
raise "Couldn't install gem, run `gem install #{built_gem_path}' for more detailed output"
end
diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb
index a9bfd57fae..e6e2b79344 100644
--- a/lib/bundler/shared_helpers.rb
+++ b/lib/bundler/shared_helpers.rb
@@ -268,7 +268,7 @@ module Bundler
until !File.directory?(current) || current == previous
if ENV["BUNDLE_SPEC_RUN"]
# avoid stepping above the tmp directory when testing
- gemspec = if ENV["BUNDLE_RUBY"] && ENV["BUNDLE_GEM"]
+ gemspec = if ENV["GEM_COMMAND"]
# for Ruby Core
"lib/bundler/bundler.gemspec"
else