зеркало из https://github.com/github/ruby.git
[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:
Родитель
e97c671b3a
Коммит
df21600b98
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче