From ae67607707653bf44a1d7187c2af063ef6362b57 Mon Sep 17 00:00:00 2001 From: Pete Hawkins Date: Mon, 27 Sep 2021 19:41:30 +0100 Subject: [PATCH] If build command fails raise a helpful exception --- lib/install/install.rb | 2 +- lib/tasks/cssbundling/build.rake | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/install/install.rb b/lib/install/install.rb index fbbb603..f02d3a0 100644 --- a/lib/install/install.rb +++ b/lib/install/install.rb @@ -46,7 +46,7 @@ say "Add default Procfile.dev" copy_file "#{__dir__}/Procfile.dev", "Procfile.dev" - say "Ensure foreman is install" + say "Ensure foreman is installed" run "gem install foreman" end diff --git a/lib/tasks/cssbundling/build.rake b/lib/tasks/cssbundling/build.rake index 247b3ff..11e051a 100644 --- a/lib/tasks/cssbundling/build.rake +++ b/lib/tasks/cssbundling/build.rake @@ -1,7 +1,9 @@ namespace :css do desc "Build your CSS bundle" task :build do - system "yarn install && yarn build:css" + unless system "yarn install && yarn build:css" + raise "cssbundling-rails: Command css:build failed, ensure yarn is installed and `yarn build:css` runs without errors" + end end end