config: Make --list and --get work on empty repos

The --list and --get implementations work just fine
on empty repos (reporting the default values). So
don't err out prematurely during option parsing.

Closes: #2585
Approved by: alexlarsson
This commit is contained in:
Matthias Clasen 2019-01-13 11:34:51 -05:00 committed by Atomic Bot
parent a76227e2a2
commit 15f9bbf8c6

View File

@ -250,7 +250,7 @@ flatpak_builtin_config (int argc, char **argv, GCancellable *cancellable, GError
g_option_context_set_translation_domain (context, GETTEXT_PACKAGE);
if (!flatpak_option_context_parse (context, options, &argc, &argv,
FLATPAK_BUILTIN_FLAG_ONE_DIR,
FLATPAK_BUILTIN_FLAG_ONE_DIR | FLATPAK_BUILTIN_FLAG_OPTIONAL_REPO,
&dirs, cancellable, error))
return FALSE;
@ -283,7 +283,8 @@ flatpak_complete_config (FlatpakCompletion *completion)
context = g_option_context_new ("");
if (!flatpak_option_context_parse (context, options, &completion->argc, &completion->argv,
FLATPAK_BUILTIN_FLAG_ONE_DIR, NULL, NULL, NULL))
FLATPAK_BUILTIN_FLAG_ONE_DIR | FLATPAK_BUILTIN_FLAG_OPTIONAL_REPO,
NULL, NULL, NULL))
return FALSE;
switch (completion->argc)