From 4bb654378900ec6bc3c0e42ab54bc489b04fc8ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Nadon?= Date: Sat, 15 Jun 2024 16:16:27 -0400 Subject: [PATCH] add tip to set LUCKY_ENV to production (#1896) * add tip to set LUCKY_ENV to production * improve raise error of watcher's config file --- src/lucky/server_settings.cr | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/lucky/server_settings.cr b/src/lucky/server_settings.cr index a6ff85d28..1200737fd 100644 --- a/src/lucky/server_settings.cr +++ b/src/lucky/server_settings.cr @@ -40,7 +40,15 @@ module Lucky::ServerSettings if File.exists?(YAML_SETTINGS_PATH) File.read YAML_SETTINGS_PATH else - raise "Expected config file for the watcher at #{YAML_SETTINGS_PATH}" + <<-ERROR + Expected config file for the watcher at #{YAML_SETTINGS_PATH}. + + Try this... + + ▸ If this is Production, be sure to set LUCKY_ENV=production + ▸ If this is Development, ensure the #{YAML_SETTINGS_PATH} file exists + + ERROR end end end