mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[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
This commit is contained in:
parent
e97c671b3a
commit
df21600b98
1 changed files with 1 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue