From 78986e6419e39ede4f216b2ea27175fcf71c5307 Mon Sep 17 00:00:00 2001 From: Finn Woelm Date: Thu, 13 Jul 2017 20:20:14 +0700 Subject: [PATCH] Fix: Check for asset precompilation when starting server When `public/assets/` is a symlink, running `find public/assets ...` does not return the correct result. By using `public/assets/`, find is able to return the correct result regardless of whether the folder is an actual folder or a symlink. [ci skip] --- script/server | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/server b/script/server index 715697d44..46b492353 100755 --- a/script/server +++ b/script/server @@ -150,7 +150,7 @@ then fi # Check if assets are precompiled -if [ "$RAILS_ENV" = "production" -a -z "$(find public/assets -maxdepth 1 -name 'main-*.js' -print -quit 2>/dev/null)" ] +if [ "$RAILS_ENV" = "production" -a -z "$(find public/assets/ -maxdepth 1 -name 'main-*.js' -print -quit 2>/dev/null)" ] then fatal "You're running in production mode without having assets precompiled. Now and after each update before you restart the