diff options
| author | ruki <[email protected]> | 2025-01-07 00:57:40 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-01-07 00:57:40 +0800 |
| commit | e66776b2980aec6bf3379814aae68882dcfb516e (patch) | |
| tree | b82c7e19fe198bef441063563e39166df8c0f47f /xmake/core/base/cli.lua | |
| parent | 55dc4ce3ea49160952bec878188d9a01a4a76f73 (diff) | |
fix cli
Diffstat (limited to 'xmake/core/base/cli.lua')
| -rw-r--r-- | xmake/core/base/cli.lua | 6 |
1 files changed, 3 insertions, 3 deletions
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)) |
