bin/remote: don't load repo on root command
authorJonathan Lebon <jlebon@redhat.com>
Mon, 11 Sep 2017 21:06:30 +0000 (21:06 +0000)
committerAtomic Bot <atomic-devel@projectatomic.io>
Wed, 13 Sep 2017 14:32:20 +0000 (14:32 +0000)
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

src/ostree/ot-builtin-remote.c

index dd999c01e4519873a1cf16c5549f49e687edc035..9d290d09218cf118fc113c39676b48b231a2a881 100644 (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). */
       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)
             {