From 00d82edafcf46694ba87482665cc0b679d77ff99 Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 17 Feb 2024 00:47:31 +0800 Subject: format config --- xmake/core/project/config.lua | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/xmake/core/project/config.lua b/xmake/core/project/config.lua index b77e6e93b..254ae9aaf 100644 --- a/xmake/core/project/config.lua +++ b/xmake/core/project/config.lua @@ -76,21 +76,12 @@ end -- @param opt the argument options, e.g. {readonly = false, force = false} -- function config.set(name, value, opt) - - -- check - assert(name) - - -- init options opt = opt or {} - - -- check readonly + assert(name) assert(opt.force or not config.readonly(name), "cannot set readonly config: " .. name) - -- set it config._CONFIGS = config._CONFIGS or {} config._CONFIGS[name] = value - - -- mark as readonly if opt.readonly then config._MODES = config._MODES or {} config._MODES["__readonly_" .. name] = true -- cgit v1.3.1