diff options
| author | ruki <[email protected]> | 2024-02-17 00:47:31 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-02-17 00:47:31 +0800 |
| commit | 00d82edafcf46694ba87482665cc0b679d77ff99 (patch) | |
| tree | fb6de20378ffd5e6597460519e5155e94b870926 | |
| parent | e073f2f372af559099e5f2b7013ff938f113a00a (diff) | |
format config
| -rw-r--r-- | xmake/core/project/config.lua | 11 |
1 files changed, 1 insertions, 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 |
