Skip to content

docs(readme): fix command syntax for share and policy create - #368

Merged
overtrue merged 1 commit into
rustfs:mainfrom
tagbug:fix/readme-command-examples
Sep 9, 2026
Merged

docs(readme): fix command syntax for share and policy create#368
overtrue merged 1 commit into
rustfs:mainfrom
tagbug:fix/readme-command-examples

Conversation

@tagbug

@tagbug tagbug commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes incorrect CLI command syntax examples in README.md for rc share and rc admin policy create.

Problem Background & Root Cause

Users following the examples in README.md encountered argument parsing errors when executing the commands:

  1. rc admin policy create local/ readonly --file policy.json failed with error: unexpected argument '--file' found. The CLI command expects 3 positional arguments <ALIAS> <NAME> <POLICY_FILE> rather than a --file flag.
  2. rc share download local/bucket/file.txt --expire 24h failed with error: unexpected argument 'local/bucket/file.txt' found. The rc share command accepts <PATH> directly without a download subcommand.

Solution

  • Updated README.md line 133 to rc share local/bucket/file.txt --expire 24h.
  • Updated README.md line 171 to rc admin policy create local/ readonly policy.json.

Test Status & Validation

  • Validated all command examples in README.md by parsing them directly against the compiled rc binary (cargo run --bin rc -- ...).
  • Confirmed zero argument parsing errors across all README.md commands.

Copilot AI lite review requested due to automatic review settings September 8, 2026 17:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

Documentation-only changes align the README examples with the CLI usage contract (per help contract tests) and introduce no behavioral or API risk.

Pull request overview

Updates README.md CLI examples to match the actual argument parsing contract for rc share and rc admin policy create, preventing copy/paste failures for users following the docs.

Changes:

  • Fixes rc share example by removing the non-existent download subcommand and passing <PATH> directly.
  • Fixes rc admin policy create example by removing the unsupported --file flag and using the required positional <POLICY_FILE> argument.
File summaries
File Description
README.md Corrects two CLI command examples to align with documented/contracted CLI usage.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@overtrue
overtrue merged commit 345ce35 into rustfs:main Sep 9, 2026
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants