Skip to content

Commit

Permalink
[rubygems/rubygems] Simplify some code
Browse files Browse the repository at this point in the history
This method always receives an array, and we require `shellwords`
unconditionally at the top of the file, so `shelljoin` will always be
available.

rubygems/rubygems@05c8ac641d
  • Loading branch information
deivid-rodriguez authored and matzbot committed Oct 13, 2021
1 parent e97c671 commit df21600
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/bundler/gem_helper.rb
Expand Up @@ -215,8 +215,7 @@ def sh_with_input(cmd)
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
Expand Down

0 comments on commit df21600

Please sign in to comment.