summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2019-05-29 00:28:02 +0800
committerruki <[email protected]>2019-05-28 20:48:14 +0800
commiteb60a76b7454975d151f2d8b5d9e19b26d561c2d (patch)
tree34b537c673a480d730e0f185d059eb15f507e7f7
parent9c37f2eb79af59e757083dad9c34a0115d72ab49 (diff)
fix option.booleanv2.2.6
-rw-r--r--xmake/core/base/option.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/xmake/core/base/option.lua b/xmake/core/base/option.lua
index 9873d8195..fee465a53 100644
--- a/xmake/core/base/option.lua
+++ b/xmake/core/base/option.lua
@@ -726,9 +726,9 @@ end
-- get the boolean value
function option.boolean(value)
if type(value) == "string" then
- value = value:lower()
- if value == "true" or value == "yes" or value == "y" then value = true
- elseif value == "false" or value == "no" or value == "n" then value = false
+ local v = value:lower()
+ if v == "true" or v == "yes" or v == "y" then value = true
+ elseif v == "false" or v == "no" or v == "n" then value = false
end
end
return value