aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorJake Teton-Landis <just.1.jake@gmail.com>2018-01-21 09:28:05 -0800
committerGitHub <noreply@github.com>2018-01-21 09:28:05 -0800
commit92e3d95099509c56b6b2f710aecfad19e97dc2c4 (patch)
tree4ee79998b799c09ed268ed09891d540a2c16b4bf /railties
parentcf1c48478d1f48d763c3bee92d6bc6cfb3e63dba (diff)
downloadrails-92e3d95099509c56b6b2f710aecfad19e97dc2c4.tar.gz
rails-92e3d95099509c56b6b2f710aecfad19e97dc2c4.tar.bz2
rails-92e3d95099509c56b6b2f710aecfad19e97dc2c4.zip
bin/yarn: Pass through arguments with spaces
Previously, the `bin/yarn` wrapper would "unquote" arguments to yarn like this: `yarn run add-copyright "(c) 2017, 2018 MyCompany"` That results in an ARGV of ['run', 'add-copyright', '(c) 2017, 2018 MyCompany'] in the yarn wrapper, but a ARGV in the yarn executable of ['run', 'add-copyright', '(c)', '2017,', '2018', MyCompany']
Diffstat (limited to 'railties')
-rw-r--r--railties/lib/rails/generators/rails/app/templates/bin/yarn.tt2
1 files changed, 1 insertions, 1 deletions
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 b4e4d95286..3d5051ec4c 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,7 @@
APP_ROOT = File.expand_path('..', __dir__)
Dir.chdir(APP_ROOT) do
begin
- exec "yarnpkg #{ARGV.join(' ')}"
+ exec %w(yarnpkg) + ARGV
rescue Errno::ENOENT
$stderr.puts "Yarn executable was not detected in the system."
$stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"