提交 b1ceffd7 编写于 作者: X Xavier Noria

run bundler programmatically rather than shelling out

上级 2a98fd96
......@@ -5,6 +5,8 @@
require 'rbconfig'
require 'open-uri'
require 'uri'
require 'bundler'
require 'bundler/cli'
module Rails
module Generators
......@@ -186,13 +188,7 @@ def gem_for_javascript
def bundle_command(command)
say_status :run, "bundle #{command}"
# We use backticks and #print here instead of vanilla #system because it
# is easier to silence stdout in the existing test suite this way. The
# end-user gets the bundler commands called anyway.
#
# Thanks to James Tucker for the Gem tricks involved in this call.
print `"#{Gem.ruby}" -rubygems "#{Gem.bin_path('bundler', 'bundle')}" #{command}`
Bundler::CLI.new.send(command)
end
def run_bundle
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册