chown, chgrp: 'cannot dereference' instead of 'cannot access' for a missing operand
メンテナーはふだん 1 日以内に返信
評価
調査の方向性
まず tests/by-util/test_chown.rs、特に test_chown_file_notexisting 内のコメントアウトされたアサーションを確認し、次にそれが検証する chown と chgrp のエラー処理を調べてください。オペランドがない場合と f/ のケースのテストを追加し、ぶら下がりシンボリックリンクに対する期待される文言「cannot dereference」は維持してください。両方のユーティリティでテストが通れば完了です。
索引モデルが issue の本文から書いたものです。
説明
For a missing operand, chown and chgrp say "cannot dereference" where GNU says "cannot access". GNU only uses "cannot dereference" when the operand is a symlink whose target can't be reached.
$ touch f
$ chown "$(id -u)" f/ nosuch/x # GNU coreutils 9.12
chown: cannot access 'f/': Not a directory
chown: cannot access 'nosuch/x': No such file or directory
$ uu-chown "$(id -u)" f/ nosuch/x
chown: cannot dereference 'f/': Not a directory
chown: cannot dereference 'nosuch/x': No such file or directory
chgrp behaves the same way. A dangling symlink (ln -s missing l; chown "$(id -u)" l) gives "cannot dereference" in both, which is correct. tests/by-util/test_chown.rs already has a commented-out assertion for this in test_chown_file_notexisting.
Found with behave, a tool that records a CLI's behaviour and replays it against another implementation.
- 主要言語
- Rust
- スター
- 24.3k
- フォーク
- 2.1k
- 平均マージ
- 1日 21時間
- マージ済み PR(30日)
- 360
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
uutils/coreutils のほかの issue
-
ls: `--block-size=0` is accepted when `--si` comes later対応中かも @Logic769 が 2 日前に担当しました。 オープンgood first issue U - ls
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
uutils/coreutils#15962 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
B - high priority U - tr
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
メンテナーはふだん 1 日以内に返信
-
U - df
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
mv: a failed cross-device move always reports "Permission denied"対応中かも @afnan-mojumder が 1 日前に担当しました。 オープンU - mv
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
uutils/coreutils の issue をすべて見る
似ている issue
-
bug duplicate enhancement priority: low ui
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
storytold/pdfcraft#5594 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
documentation good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
open-jarvis/OpenJarvis#1212 ·
メンテナーはふだん 4 日以内に返信
-
bug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
CakeRepository/agentshangout#38 ·
メンテナーはふだん 1 日以内に返信