Skip to content

fix: hide --input-file and --dry-run on no-input read-only commands - #487

Merged
margaretjgu merged 1 commit into
mainfrom
fix/hide-noop-flags-readonly
Jul 27, 2026
Merged

fix: hide --input-file and --dry-run on no-input read-only commands#487
margaretjgu merged 1 commit into
mainfrom
fix/hide-noop-flags-readonly

Conversation

@margaretjgu

@margaretjgu margaretjgu commented Jul 24, 2026

Copy link
Copy Markdown
Member

Closes #378. defineCommand now takes a readOnly flag (set from the HTTP method in the es/kb/cloud registration layers) and hides --input-file and --dry-run when a command is read-only and its input schema has no fields, e.g. es info. Write commands with empty schemas and GET-with-body APIs like es search keep their flags; the docs/cli/schema.json diff is regeneration.

@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

🔍 Preview links for changed docs

⏳ Building and deploying preview... View progress

This comment will be updated with preview links when the build is complete.

@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

MegaLinter analysis: Success

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ COPYPASTE jscpd yes no no 0.97s
✅ REPOSITORY gitleaks yes no no 63.92s
✅ REPOSITORY git_diff yes no no 0.76s
✅ REPOSITORY secretlint yes no no 30.88s
✅ REPOSITORY trivy yes no no 17.32s
✅ TYPESCRIPT eslint 6 0 0 5.59s

Notices

📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining SECURITY_SUGGESTIONS: false)

See detailed reports in MegaLinter artifacts
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security
Show us your support by starring ⭐ the repository

@margaretjgu margaretjgu changed the title Hide --input-file and --dry-run on no-input read-only commands fix: hide --input-file and --dry-run on no-input read-only commands Jul 24, 2026
@margaretjgu margaretjgu reopened this Jul 24, 2026
@margaretjgu
margaretjgu force-pushed the fix/hide-noop-flags-readonly branch from 628bb77 to ca4228a Compare July 27, 2026 18:06
@margaretjgu
margaretjgu merged commit c98f210 into main Jul 27, 2026
32 of 33 checks passed
@margaretjgu
margaretjgu deleted the fix/hide-noop-flags-readonly branch July 27, 2026 18:20
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.

Read-only commands should not show --input-file or --dry-run options in --help output

2 participants