Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove misleading CLI documentation for boolean options #462

Merged
merged 1 commit into from
Aug 4, 2022

Conversation

ricksbrown
Copy link
Contributor

Most of the on/off cli flags are backed by BooleanOptionHandler which
does not allow explicit boolean values to be provided.

The exception is --latest which uses ExplicitBooleanOptionHandler.

This change removes the misleading "set to true" or "set to false" for
the cli flags that do not accept true/false (or any other values).

This caused me a bit of trouble as I was trying to use the CLI, following the documentation, and it kept failing like so:

No argument is allowed: true
Exception in thread "main" java.io.IOException: Failed to read command-line arguments
        at io.jenkins.tools.pluginmanager.cli.Main.main(Main.java:26)
Caused by: org.kohsuke.args4j.CmdLineException: No argument is allowed: true
        at org.kohsuke.args4j.CmdLineParser.parseArgument(CmdLineParser.java:509)
        at io.jenkins.tools.pluginmanager.cli.Main.main(Main.java:22)
  • [x ] Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • [x ] Ensure that the pull request title represents the desired changelog entry
  • [ x] Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

Most of the on/off cli flags are backed by `BooleanOptionHandler` which
does not allow explicit boolean values to be provided.
The exception is `--latest` which uses `ExplicitBooleanOptionHandler`.
This change removes the misleading "set to true" or "set to false" for
the cli flags that do not accept true/false (or any other values).
Copy link
Member

@timja timja left a comment

Choose a reason for hiding this comment

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

Thanks!

@timja timja added the documentation Improvements or additions to documentation label Aug 4, 2022
@timja timja merged commit 59e182a into jenkinsci:master Aug 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants