From 061624e68636ce139232772921df9946d33e7edc Mon Sep 17 00:00:00 2001 From: Samuel Cooper Date: Mon, 16 Apr 2018 22:22:35 +0200 Subject: [PATCH] Only execute assets generation for rspec if 100% necessary --- wrapper | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wrapper b/wrapper index 7006d9b..6bc3afc 100755 --- a/wrapper +++ b/wrapper @@ -118,7 +118,9 @@ dia_restart() { dia_rspec() { ! dia_is_configured && exit_unconfigured - docker-compose run --rm diaspora /bin/sh -c 'RAILS_ENV="test" bin/rake db:create db:migrate assets:generate_error_pages' + addendum="" + [ -f "$DIASPORA_PATH"/public/404.html ] && addendum="assets:generate_error_pages" + docker-compose run --rm diaspora /bin/sh -c "RAILS_ENV=test bin/rake db:create db:migrate ${addendum}" docker-compose run --rm diaspora bin/rspec "$@" }