Skip to content

Commit

Permalink
builder: Fix documentation of --list --list-format option (RHBZ#11405…
Browse files Browse the repository at this point in the history
…47).

Also give an error if users use the incorrect one:

$ virt-builder --list --format json
virt-builder: virt-builder --list: use '--list-format', not '--format'.
  • Loading branch information
rwmjones committed Sep 11, 2014
1 parent b047fea commit de3614e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions builder/cmdline.ml
Expand Up @@ -243,6 +243,10 @@ read the man page virt-builder(1).
exit 1
)
| `List ->
if format <> None then (
eprintf (f_"%s: virt-builder --list: use '--list-format', not '--format'.\n") prog;
exit 1
);
(match args with
| [] -> ""
| _ ->
Expand Down
4 changes: 2 additions & 2 deletions builder/virt-builder.pod
Expand Up @@ -307,13 +307,13 @@ alternate home directory:

=item B<--list>

=item B<--list --format> format
=item B<--list --list-format> format

=item B<--list --long>

List available templates.

It is possible to choose with I<--format> the output format for the list
It is possible to choose with I<--list-format> the output format for the list
templates:

=over 4
Expand Down

0 comments on commit de3614e

Please sign in to comment.