Update config.lua

Co-authored-by: Kayou <pierre@kayou.io>
This commit is contained in:
Alexandre Aubin 2020-07-27 15:44:58 +02:00 committed by GitHub
parent 0b9f50246c
commit 971cd1802c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,7 +11,9 @@ function get_config()
-- Load the configuration file
local conf_file = assert(io.open(conf_path, "r"), "Configuration file is missing")
local conf = json.decode(conf_file:read("*all"))
conf_file:close()
if conf_file ~= nil then
conf_file:close()
end
-- Load additional rules from the `.persistent` configuration file.
-- The `.persistent` file contains rules that will overwrite previous rules.