bin/remote: don't load repo on root command

Subcommands will demand a repo argument themselves. This allows one to
call `ostree remote` and get the "No subcommand" error rather than the
"Missing --repo" error.

Closes: #1126
Approved by: cgwalters
This commit is contained in:
Jonathan Lebon 2017-09-11 21:06:30 +00:00 committed by Atomic Bot
parent 4c02fc2daa
commit 4cc813133c
1 changed files with 2 additions and 1 deletions

View File

@ -115,7 +115,8 @@ ostree_builtin_remote (int argc, char **argv, GCancellable *cancellable, GError
/* This will not return for some options (e.g. --version). */ /* This will not return for some options (e.g. --version). */
if (ostree_option_context_parse (context, NULL, &argc, &argv, if (ostree_option_context_parse (context, NULL, &argc, &argv,
OSTREE_BUILTIN_FLAG_NONE, NULL, cancellable, error)) OSTREE_BUILTIN_FLAG_NO_REPO, NULL, cancellable,
error))
{ {
if (subcommand_name == NULL) if (subcommand_name == NULL)
{ {