From b7863d96b83d605c4c91dfa3a4f324594d33f23c Mon Sep 17 00:00:00 2001 From: Bruce Hill <bruce@bruce-hill.com> Date: Thu, 12 Sep 2019 13:50:04 -0700 Subject: [PATCH] Better error message for missing config file --- nowopen | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nowopen b/nowopen index 82e3643..0d43013 100755 --- a/nowopen +++ b/nowopen @@ -19,7 +19,10 @@ local XDG_DATA_HOME = os.getenv("XDG_DATA_HOME") or "~/.local/share" local f = io.open(XDG_DATA_HOME..'/nowopen/businesshours') or io.open('~/.businesshours') if not f then - print("Could not find config file") + print("Could not find config file.\n" + .."Please create a config file in either " + ..XDG_DATA_HOME.."/nowopen/businesshours or ~/.businesshours\n" + .."For an example, see the 'example_businesshours' file included with nowopen.") os.exit(1) end local place_text = f:read("*a")