Can't only use optional arguments?
还没有人认领这个 Issue。
评估
调研方向
使用两个命令示例 ./prog.lua build 和 ./prog.lua install,在配置好两个选项的情况下重现该问题。阅读报告错误参数数量的参数解析逻辑;当任一命令都能单独运行而不要求另一个选项时完成。
由索引模型根据 Issue 内容生成。
描述
Example of what should be done:
./prog.lua build
and
./prog.lua install
but if i make install and build both options i get the following error:
mpm: bad number of arguments: 0 argument(s) must be specified, not 1; re-run with help for usage
I can set build or install as arguments, but that makes both options REQUIRED, which is not what is wanted.
- 主要语言
- Lua
- 星标
- 129
- 派生
- 26
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
lunarmodules/lua_cliargs 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
lunarmodules/lua_cliargs#85 · 1 条评论 ·
-
Parsing --help needs to return something other than an error可能已有人在做 @TheMagician23 于 1040 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 35/100
lunarmodules/lua_cliargs#72 · 1 条评论 ·
-
Option to accept multiple options not documented可能已有人在做 @copilot-swe-agent 于 77 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 48/100
lunarmodules/lua_cliargs#70 ·
-
难度 3/5 1-2 天 新手友好度 55/100
lunarmodules/lua_cliargs#69 ·
-
难度 3/5 1-2 天 新手友好度 45/100
lunarmodules/lua_cliargs#67 ·
查看 lunarmodules/lua_cliargs 的全部 Issue
相似的 Issue
-
bug
难度 1/5 1 小时以内 新手友好度 75/100
dense-analysis/ale#5174 ·
-
难度 2/5 1-3 小时 新手友好度 66/100
LuaLS/lua-language-server#3477 ·
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
Bug Forever Module - Tooltips
难度 2/5 1-3 小时 新手友好度 64/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 88/100
jitsi/jitsi-meet#18020 ·
维护者通常 1 天内回复