From 388f64a26529d8614d27a5132c7fb90e5edb6575 Mon Sep 17 00:00:00 2001 From: Jake Teton-Landis Date: Tue, 23 Jan 2018 00:44:19 -0800 Subject: yarnpkg: correct exec syntax MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previous change didn’t expand this array of arguments --- railties/lib/rails/generators/rails/app/templates/bin/yarn.tt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'railties') diff --git a/railties/lib/rails/generators/rails/app/templates/bin/yarn.tt b/railties/lib/rails/generators/rails/app/templates/bin/yarn.tt index 3d5051ec4c..abd09a9756 100644 --- a/railties/lib/rails/generators/rails/app/templates/bin/yarn.tt +++ b/railties/lib/rails/generators/rails/app/templates/bin/yarn.tt @@ -1,7 +1,8 @@ APP_ROOT = File.expand_path('..', __dir__) Dir.chdir(APP_ROOT) do begin - exec %w(yarnpkg) + ARGV + command = %w(yarnpkg) + ARGV + exec(*command) rescue Errno::ENOENT $stderr.puts "Yarn executable was not detected in the system." $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install" -- cgit v1.2.3