Permalink
Browse files

Show message if Yarn is not installed (#27312)

  • Loading branch information...
guilleiguaran authored and dhh committed Dec 9, 2016
1 parent cfc126e commit 872faa958398fa5aaf6b0e4cd6a8090503d6885a
Showing with 8 additions and 1 deletion.
  1. +8 −1 railties/lib/rails/generators/rails/app/templates/bin/yarn
@@ -1,2 +1,9 @@
VENDOR_PATH = File.expand_path('../vendor', __dir__)
Dir.chdir(VENDOR_PATH) { exec "yarnpkg #{ARGV.join(" ")}" }
Dir.chdir(VENDOR_PATH) do
begin
exec "yarnpkg #{ARGV.join(" ")}"
rescue Errno::ENOENT
puts "Yarn executable was not detected in the system."
puts "Download Yarn at https://yarnpkg.com/en/docs/install"
end
end

0 comments on commit 872faa9

Please sign in to comment.