Skip to content

Commit

Permalink
Reorder config priority for user files
Browse files Browse the repository at this point in the history
  • Loading branch information
edubart committed Sep 30, 2020
1 parent 3fd1abf commit 5be1448
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion nelua/configer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,10 @@ local function load_config(configfile)
if not fs.isfile(configfile) then return end
local ok, err = pcall(function()
local conf = dofile(configfile)
merge_configs(defconfig, conf)
merge_configs(conf, defconfig)

-- overwrite defconfig without making a new reference
tabler.update(defconfig, conf)
end)
if not ok then --luacov:disable
console.errorf('failed to load config "%s": %s', configfile, err)
Expand Down

0 comments on commit 5be1448

Please sign in to comment.