summaryrefslogtreecommitdiff
path: root/lib/bundler/gem_helper.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2021-08-25 14:49:49 +0200
committergit <svn-admin@ruby-lang.org>2021-10-13 23:30:12 +0900
commitdf21600b98dfe58528e1ace9961b8eb6bbad5b46 (patch)
tree93e09144dce7a4103cf81572f35d2eefff17c7a8 /lib/bundler/gem_helper.rb
parente97c671b3a21aeb1b2813f44487b6232cb39a205 (diff)
[rubygems/rubygems] Simplify some code
This method always receives an array, and we require `shellwords` unconditionally at the top of the file, so `shelljoin` will always be available. https://github.com/rubygems/rubygems/commit/05c8ac641d
Diffstat (limited to 'lib/bundler/gem_helper.rb')
-rw-r--r--lib/bundler/gem_helper.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/bundler/gem_helper.rb b/lib/bundler/gem_helper.rb
index c8fb74072a..dd1dc096f5 100644
--- a/lib/bundler/gem_helper.rb
+++ b/lib/bundler/gem_helper.rb
@@ -215,8 +215,7 @@ module Bundler
def sh(cmd, &block)
out, status = sh_with_status(cmd, &block)
unless status.success?
- cmd = cmd.shelljoin if cmd.respond_to?(:shelljoin)
- raise("Running `#{cmd}` failed with the following output:\n\n#{out}\n")
+ raise("Running `#{cmd.shelljoin}` failed with the following output:\n\n#{out}\n")
end
out
end