close
Skip to content

Use HasAvailableFlags instead of HasFlags for Options in help#959

Merged
vdemeester merged 1 commit into
docker:masterfrom
vdemeester:help-use-available-flags
Mar 22, 2018
Merged

Use HasAvailableFlags instead of HasFlags for Options in help#959
vdemeester merged 1 commit into
docker:masterfrom
vdemeester:help-use-available-flags

Conversation

@vdemeester

Copy link
Copy Markdown
Collaborator

HasAvailableFlags checks if the command contains any flags (local
plus persistent from the entire structure) which are not hidden or
deprecated.

This fix the --help display when the Options is empty (but
showing), like on docker trust key

Before this change, it looks like that :

$ docker trust key --help
Usage:  docker trust key COMMAND

Manage keys for signing Docker images (experimental)

Options:


Commands:
  generate    Generate and load a signing key-pair
  load        Load a private key file for signing

Run 'docker trust key COMMAND --help' for more information on a command.

After

$ docker trust key --help

Usage:  docker trust key COMMAND

Manage keys for signing Docker images

Commands:
  generate    Generate and load a signing key-pair
  load        Load a private key file for signing

Run 'docker trust key COMMAND --help' for more information on a command.

🦁

Signed-off-by: Vincent Demeester vincent@sbr.pm

@thaJeztah thaJeztah left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks!

> HasAvailableFlags checks if the command contains any flags (local
> plus persistent from the entire structure) which are not hidden or
> deprecated.

This fix the `--help` display when the `Options` is empty (but
showing), like on `docker trust key`

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
@vdemeester vdemeester force-pushed the help-use-available-flags branch from dc65597 to 66fdd08 Compare March 22, 2018 14:24

@dnephin dnephin 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.

LGTM

@vdemeester vdemeester merged commit a6d2354 into docker:master Mar 22, 2018
@GordonTheTurtle GordonTheTurtle added this to the 18.04.0 milestone Mar 22, 2018
@vdemeester vdemeester deleted the help-use-available-flags branch March 22, 2018 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants