summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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