[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:
David Rodríguez 2021-08-25 14:49:49 +02:00 коммит произвёл git
Родитель e97c671b3a
Коммит df21600b98
1 изменённых файлов: 1 добавлений и 2 удалений

Просмотреть файл

@ -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