aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2019-09-12 13:50:04 -0700
committerBruce Hill <bruce@bruce-hill.com>2019-09-12 13:50:04 -0700
commitb7863d96b83d605c4c91dfa3a4f324594d33f23c (patch)
tree2eac83e8c0c37067ff602e367550eaba9efe44ff
parent4c65128582fc5ff06dfa269f260fb99cf40b5786 (diff)
Better error message for missing config file
-rwxr-xr-xnowopen5
1 files changed, 4 insertions, 1 deletions
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")