summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBundlerbot <bot@bundler.io>2019-04-04 19:57:11 +0000
committerBundlerbot <bot@bundler.io>2019-04-04 19:57:11 +0000
commit79c380f58112be7d0a71b167ff026ab2a9e9f9a2 (patch)
tree7330fc055b7ba96220648379095fa8cf75b8669a /lib
parentbe2a4d069e753d17381c9629f00c4927c3cacb76 (diff)
parent70cb2f0767395a7ae9f5955eab1b16f30cf05930 (diff)
downloadbundler-79c380f58112be7d0a71b167ff026ab2a9e9f9a2.tar.gz
Merge #7023
7023: Shellsplit build config r=deivid-rodriguez a=deivid-rodriguez ### What was the end-user problem that led to this PR? The problem was #6940. Build configurations with multiple whitepaced parameter are no longer properly handled. ### What was your diagnosis of the problem? My diagnosis was not mine, was @jeremy's: Since [shellscaping / shelljoining build arguments to the rubygems gem installer](https://github.com/bundler/bundler/issues/6940), these are no longer properly passed ### What is your fix for the problem, implemented in this PR? My fix is not mine, it's @jeremy's: shellsplit settings before passing them. ### Why did you choose this fix out of the possible options? I chose this fix because it works and it sounds like the proper followup to https://github.com/rubygems/rubygems/pull/2441. Fixes #6940. Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/installer/gem_installer.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/bundler/installer/gem_installer.rb b/lib/bundler/installer/gem_installer.rb
index e5e245f970..9689911d6c 100644
--- a/lib/bundler/installer/gem_installer.rb
+++ b/lib/bundler/installer/gem_installer.rb
@@ -1,5 +1,7 @@
# frozen_string_literal: true
+require "shellwords"
+
module Bundler
class GemInstaller
attr_reader :spec, :standalone, :worker, :force, :installer
@@ -56,7 +58,9 @@ module Bundler
def spec_settings
# Fetch the build settings, if there are any
- Bundler.settings["build.#{spec.name}"]
+ if settings = Bundler.settings["build.#{spec.name}"]
+ Shellwords.shellsplit(settings)
+ end
end
def install