Skip to content

Commit

Permalink
[rubygems/rubygems] Use shellsplit instead of array of strings
Browse files Browse the repository at this point in the history
Previously, the command string to be used for the shell command
was first generated and then split using shellsplit. This change
reverts the current behavior as it breaks if the value of remote
contains a space.

rubygems/rubygems@6649ee10b0
  • Loading branch information
Maimer authored and matzbot committed Nov 9, 2021
1 parent e014c9d commit d7432fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/bundler/gem_helper.rb
Expand Up @@ -129,8 +129,8 @@ def built_gem_path

def git_push(remote = nil)
remote ||= default_remote
sh(%W[git push #{remote} refs/heads/#{current_branch}])
sh(%W[git push #{remote} refs/tags/#{version_tag}])
sh("git push #{remote} refs/heads/#{current_branch}".shellsplit)
sh("git push #{remote} refs/tags/#{version_tag}".shellsplit)
Bundler.ui.confirm "Pushed git commits and release tag."
end

Expand Down

0 comments on commit d7432fd

Please sign in to comment.