ruby-changes:69653
From: Nicholas <ko1@a...>
Date: Tue, 9 Nov 2021 10:56:32 +0900 (JST)
Subject: [ruby-changes:69653] d7432fdee5 (master): [rubygems/rubygems] Use `shellsplit` instead of array of strings
https://git.ruby-lang.org/ruby.git/commit/?id=d7432fdee5 From d7432fdee585257686f381a5cf04ea53847bd6b8 Mon Sep 17 00:00:00 2001 From: Nicholas Lee <nicholas.lee@a...> Date: Mon, 8 Nov 2021 15:52:49 -0800 Subject: [rubygems/rubygems] Use `shellsplit` instead of array of strings 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. https://github.com/rubygems/rubygems/commit/6649ee10b0 --- lib/bundler/gem_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bundler/gem_helper.rb b/lib/bundler/gem_helper.rb index 60b9e578878..034f2e59602 100644 --- a/lib/bundler/gem_helper.rb +++ b/lib/bundler/gem_helper.rb @@ -129,8 +129,8 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/gem_helper.rb#L129 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 -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/