From 4cc813133c5aa074d2d2664fb57b9edb74c610c8 Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Mon, 11 Sep 2017 21:06:30 +0000 Subject: [PATCH] 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 --- src/ostree/ot-builtin-remote.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ostree/ot-builtin-remote.c b/src/ostree/ot-builtin-remote.c index dd999c01..9d290d09 100644 --- a/src/ostree/ot-builtin-remote.c +++ b/src/ostree/ot-builtin-remote.c @@ -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) {