diff options
author | Burke Libbey <burke@libbey.me> | 2019-12-16 17:50:56 -0500 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-12-17 00:58:32 +0000 |
commit | 62e680cdcf40da86b1f47e7f59a2716820ff1e3c (patch) | |
tree | d78a8e3cce0874942b862b6acd7713e3223c184a | |
parent | db59e94059480134b99da9815597b7cc2bf53e81 (diff) |
ruby-modules: parse build_flags correctly:
In building a gem whose native extension is a Rakefile, the previous
version of this code will call essentially `rake ""`, when it means to
call `rake`.
This change converts `""` into `[]` rather than `[""]`.
-rw-r--r-- | pkgs/development/ruby-modules/gem/nix-bundle-install.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pkgs/development/ruby-modules/gem/nix-bundle-install.rb b/pkgs/development/ruby-modules/gem/nix-bundle-install.rb index 142d2da9bee2..0d501bd9add7 100644 --- a/pkgs/development/ruby-modules/gem/nix-bundle-install.rb +++ b/pkgs/development/ruby-modules/gem/nix-bundle-install.rb @@ -5,6 +5,7 @@ require 'rubygems/command' require 'fileutils' require 'pathname' require 'tmpdir' +require 'shellwords' if defined?(Encoding.default_internal) Encoding.default_internal = Encoding::UTF_8 @@ -31,7 +32,7 @@ bin_dir = File.join(ENV["out"], "bin") type = ARGV[0] name = ARGV[1] version = ARGV[2] -build_flags = ARGV[3] +build_flags = Shellwords.split(ARGV[3]) if type == "git" uri = ARGV[4] REPO = ARGV[5] @@ -117,7 +118,7 @@ else source = Bundler::Source::Path.new(options) end spec = source.specs.search_all(name).first -Bundler.rubygems.with_build_args [build_flags] do +Bundler.rubygems.with_build_args build_flags do source.install(spec) end |