mirror of
https://github.com/moparisthebest/imapfilter
synced 2024-12-21 07:08:49 -05:00
Read config from stdin if config is specified as '-'
This commit is contained in:
parent
ef03d60ba3
commit
1c4cc7bc2b
@ -24,7 +24,7 @@ The command line options of
|
||||
are as follows:
|
||||
.Bl -tag -width Ds
|
||||
.It Fl c Ar configfile
|
||||
Path to the configuration file. The default is
|
||||
Path to the configuration file, or - to read from stdin. The default is
|
||||
.Pa $HOME/.imapfilter/config.lua .
|
||||
.It Fl d Ar debugfile
|
||||
File that contains debugging information about the full communication with the
|
||||
|
@ -78,7 +78,7 @@ start_lua()
|
||||
"=<command line>") || lua_pcall(lua, 0, LUA_MULTRET, 0))
|
||||
fatal(ERROR_CONFIG, "%s\n", lua_tostring(lua, -1));
|
||||
} else {
|
||||
if (luaL_loadfile(lua, opts.config))
|
||||
if (luaL_loadfile(lua, strcmp(opts.config, "-") == 0 ? NULL : opts.config))
|
||||
fatal(ERROR_CONFIG, "%s\n", lua_tostring(lua, -1));
|
||||
lua_pushcfunction(lua, traceback_handler);
|
||||
lua_insert(lua, 1);
|
||||
|
Loading…
Reference in New Issue
Block a user