realpath: empty operand aborts with a garbled error instead of being reported as missing
维护者通常 1 天内回复
评估
调研方向
从 realpath 的参数解析和操作数处理入手,然后将其行为与本 issue 中关于空操作数以及空的 --relative-to 或 --relative-base 值的示例进行比较。检查现有的 realpath 测试,并为这些情况补充覆盖;完成标准是空值被报告为缺失文件,同时其他操作数仍能解析,退出状态为 1。
由索引模型根据 Issue 内容生成。
描述
realpath rejects an empty operand while parsing arguments, so it prints a garbled clap error and skips every other operand. GNU treats '' like any missing file: it reports it and still resolves the rest.
$ realpath '' /usr; echo "exit $?"
error: error: invalid value for one of the arguments
exit 1
GNU coreutils 9.12:
$ realpath '' /usr; echo "exit $?"
realpath: '': No such file or directory
/usr
exit 1
The same garbled message shows up for --relative-to='' and --relative-base='', where GNU prints realpath: '': No such file or directory.
Found with behave, comparing uutils realpath (main) against a spec recorded from GNU realpath 9.12.
- 主要语言
- Rust
- 星标
- 24.3k
- 派生
- 2.2k
- 平均合并
- 2 天 17 小时
- 30 天内合并 PR
- 422
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
uutils/coreutils 的其他 Issue
-
cp: fails to compile due to E0609 error可能已有人在做 @Devel08 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
pr: -o/--indent does not pad the header line可能已有人在做 @emirmrkaljevic 于 2 天前认领。 未关闭U - pr
难度 2/5 1-3 小时 新手友好度 83/100
维护者通常 1 天内回复
-
难度 2/5 半天 新手友好度 62/100
维护者通常 1 天内回复
-
nl: section delimiters reset --join-blank-lines grouping可能已有人在做 @coracoracora 于 4 天前认领。 未关闭U - nl
难度 2/5 1-3 小时 新手友好度 74/100
uutils/coreutils#16130 · 1 条评论 ·
维护者通常 1 天内回复
-
uniq: overflowing -f/-s/-w values with trailing garbage are silently accepted可能已有人在做 @huuan26 于 5 天前认领。 未关闭U - uniq
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
RustCrypto/utils#1597 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
max-sixty/worktrunk#4727 · 7 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 86/100
维护者通常 1 天内回复
-
follow-up
难度 2/5 1-3 小时 新手友好度 73/100
carrick-sh/carrick#1859 ·
维护者通常 1 天内回复