From e66776b2980aec6bf3379814aae68882dcfb516e Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 7 Jan 2025 00:57:40 +0800 Subject: fix cli --- xmake/core/base/cli.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xmake/core/base/cli.lua') diff --git a/xmake/core/base/cli.lua b/xmake/core/base/cli.lua index 9eb4dfb71..f9a73759f 100644 --- a/xmake/core/base/cli.lua +++ b/xmake/core/base/cli.lua @@ -89,10 +89,10 @@ function cli.parsev(argv, flags) table.insert(parsed, cli._make_segment("sep", "--", argv, index, {})) elseif value:startswith("--") then -- "--key:value", "--key=value", "--long-flag" - local sep = value:find("[=]", 3, false) - -- ignore namespace, e.g. `--namespace::opt` + local sep = value:find("[=:]", 3, false) + -- ignore namespace, e.g. `--namespace::opt=` if sep and value:sub(sep, sep + 1) == "::" then - sep = nil + sep = value:find("=", 3, false) end if sep then table.insert(parsed, cli._make_option(value:sub(3, sep - 1), value:sub(sep + 1), false, argv, index)) -- cgit v1.3.1