summaryrefslogtreecommitdiff
path: root/xmake/scripts/action
diff options
context:
space:
mode:
authorruki <[email protected]>2015-05-12 09:06:03 +0800
committerruki <[email protected]>2015-05-12 09:06:21 +0800
commit7a187d3be10e1aeced3b1cc84a1d3b458ecfc53d (patch)
tree19a47b69d2cc1b8684b890e24ce3cc2fa06cc54f /xmake/scripts/action
parenta0185c1df5558103ca4c510036088a17bf379c94 (diff)
enable boolean for only key option and add is_absolute
Diffstat (limited to 'xmake/scripts/action')
-rw-r--r--xmake/scripts/action/config.lua13
1 files changed, 8 insertions, 5 deletions
diff --git a/xmake/scripts/action/config.lua b/xmake/scripts/action/config.lua
index e12ac898c..fb822422e 100644
--- a/xmake/scripts/action/config.lua
+++ b/xmake/scripts/action/config.lua
@@ -31,13 +31,16 @@ function config._save_option(file, option)
-- check
assert(file and option)
-
- -- save number
- if type(option) == "number" then
- file:write(option)
+
-- save string
- elseif type(option) == "string" then
+ if type(option) == "string" then
file:write(string.format("%q", option))
+ -- save boolean
+ elseif type(option) == "boolean" then
+ file:write(tostring(option))
+ -- save number
+ elseif type(option) == "number" then
+ file:write(option)
-- save table
elseif type(option) == "table" then