From 81eaccd5f330ddb36ae8587eb4b75465eed78328 Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 18 Jul 2019 23:57:12 +0800 Subject: improve option.find --- xmake/core/base/option.lua | 4 ++-- 1 file 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 -- cgit v1.3.1