mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #41824 from jaredbeck/patch-7
Exit before assets:precompile task if yarn:install fails
This commit is contained in:
commit
7bd6a74e87
1 changed files with 5 additions and 1 deletions
|
@ -16,7 +16,11 @@ namespace :yarn do
|
||||||
"--immutable"
|
"--immutable"
|
||||||
end
|
end
|
||||||
|
|
||||||
system({ "NODE_ENV" => node_env }, "#{RbConfig.ruby} \"#{Rails.root}/bin/yarn\" install #{yarn_flags}")
|
system(
|
||||||
|
{ "NODE_ENV" => node_env },
|
||||||
|
"#{RbConfig.ruby} \"#{Rails.root}/bin/yarn\" install #{yarn_flags}",
|
||||||
|
exception: true
|
||||||
|
)
|
||||||
rescue Errno::ENOENT
|
rescue Errno::ENOENT
|
||||||
$stderr.puts "bin/yarn was not found."
|
$stderr.puts "bin/yarn was not found."
|
||||||
$stderr.puts "Please run `bundle exec rails app:update:bin` to create it."
|
$stderr.puts "Please run `bundle exec rails app:update:bin` to create it."
|
||||||
|
|
Loading…
Reference in a new issue