diff options
| -rw-r--r-- | xmake/core/base/option.lua | 9 | ||||
| -rwxr-xr-x | xmake/plugins/macro/macros/package.lua | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/xmake/core/base/option.lua b/xmake/core/base/option.lua index 7deb2a3f4..3760c42d1 100644 --- a/xmake/core/base/option.lua +++ b/xmake/core/base/option.lua @@ -168,9 +168,10 @@ function option.init(menu) -- parse key and value local key, value local i = arg:find("=", 1, true) + local hasspace = arg:find("%s") -- key=value? - if i then + if i and not hasspace then key = arg:sub(1, i - 1) value = arg:sub(i + 1) -- only key? @@ -181,11 +182,11 @@ function option.init(menu) -- --key? local prefix = 0 - if key:startswith("--") then + if not hasspace and key:startswith("--") then key = key:sub(3) prefix = 2 -- -k? - elseif key:startswith("-") then + elseif not hasspace and key:startswith("-") then key = key:sub(2) prefix = 1 end @@ -314,7 +315,7 @@ function option.init(menu) -- value? else - + -- find a value option with name local opt = nil for _, o in ipairs(option._taskmenu().options) do diff --git a/xmake/plugins/macro/macros/package.lua b/xmake/plugins/macro/macros/package.lua index 922a52b1f..446fe595f 100755 --- a/xmake/plugins/macro/macros/package.lua +++ b/xmake/plugins/macro/macros/package.lua @@ -87,7 +87,7 @@ function main(argv) os.mkdir(format("%s/%s.pkg/lib/%s/%s/universal", outputdir, target:name(), mode, plat)) -- package all archs - os.exec("xmake l lipo \" %s\"", lipoargs) + os.exec("xmake l lipo \"%s\"", lipoargs) end end end |
