summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 95eef75..357a04f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -12,6 +12,7 @@
#else
# include <unistd.h>
#endif
+#include <errno.h>
void print_load_error(lua_State *L, const char *script_file, int error_type);
@@ -29,6 +30,10 @@ int main(int argc, char **argv)
/* configure working directory */
if (options.working_dir != NULL) {
chdir(options.working_dir);
+ if (errno == ENOENT) {
+ honey_log(HONEY_FATAL, "[FATAL] could not find directory \"%s\"\n", options.working_dir);
+ return 1;
+ }
}
/* set up lua state */