summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2019-07-18 23:57:12 +0800
committerruki <[email protected]>2019-07-18 17:43:12 +0800
commit81eaccd5f330ddb36ae8587eb4b75465eed78328 (patch)
tree63fb75f731fa1981ed2d5a6cc805f38dd9b5c291
parent18f63d13bc56b6d22be8ae5ba4d3db9b398a17b8 (diff)
improve option.find
-rw-r--r--xmake/core/base/option.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/core/base/option.lua b/xmake/core/base/option.lua
index feec19a11..60824bd1d 100644
--- a/xmake/core/base/option.lua
+++ b/xmake/core/base/option.lua
@@ -433,14 +433,14 @@ function option.find(argv, name, shortname)
if nextvalue then return arg end
-- --name=value?
- if name and arg:startswith("--" .. name) then
+ if name and arg:startswith("--" .. name .. "=") then
-- get value
local i = arg:find("=", 1, true)
if i then return arg:sub(i + 1) end
-- -shortname value?
- elseif shortname and arg:startswith("-" .. shortname) then
+ elseif shortname and arg == ("-" .. shortname) then
-- get value
nextvalue = true