diff --git a/src/ostree/ot-admin-builtin-instutil.c b/src/ostree/ot-admin-builtin-instutil.c index 7b446e93..0770b1b2 100644 --- a/src/ostree/ot-admin-builtin-instutil.c +++ b/src/ostree/ot-admin-builtin-instutil.c @@ -106,7 +106,7 @@ ot_admin_builtin_instutil (int argc, char **argv, GCancellable *cancellable, GEr /* This will not return for some options (e.g. --version). */ if (ostree_admin_option_context_parse (context, NULL, &argc, &argv, - OSTREE_ADMIN_BUILTIN_FLAG_UNLOCKED, + OSTREE_ADMIN_BUILTIN_FLAG_NO_SYSROOT, NULL, cancellable, error)) { if (subcommand_name == NULL) diff --git a/src/ostree/ot-builtin-admin.c b/src/ostree/ot-builtin-admin.c index 16aaec03..ce0b2ffa 100644 --- a/src/ostree/ot-builtin-admin.c +++ b/src/ostree/ot-builtin-admin.c @@ -126,7 +126,7 @@ ostree_builtin_admin (int argc, char **argv, GCancellable *cancellable, GError * /* This will not return for some options (e.g. --version). */ if (ostree_admin_option_context_parse (context, NULL, &argc, &argv, - OSTREE_ADMIN_BUILTIN_FLAG_NONE | OSTREE_ADMIN_BUILTIN_FLAG_UNLOCKED, + OSTREE_ADMIN_BUILTIN_FLAG_NO_SYSROOT, NULL, cancellable, error)) { if (subcommand_name == NULL) diff --git a/src/ostree/ot-main.c b/src/ostree/ot-main.c index eda787b4..a6ddfe74 100644 --- a/src/ostree/ot-main.c +++ b/src/ostree/ot-main.c @@ -374,10 +374,11 @@ ostree_admin_option_context_parse (GOptionContext *context, g_option_context_add_main_entries (context, global_admin_entries, NULL); - if (!ostree_option_context_parse (context, main_entries, argc, argv, OSTREE_BUILTIN_FLAG_NO_REPO, NULL, cancellable, error)) + if (!ostree_option_context_parse (context, main_entries, argc, argv, + OSTREE_BUILTIN_FLAG_NO_REPO, NULL, cancellable, error)) return FALSE; - if (flags & OSTREE_ADMIN_BUILTIN_FLAG_NO_SYSROOT) + if (!opt_print_current_dir && (flags & OSTREE_ADMIN_BUILTIN_FLAG_NO_SYSROOT)) { g_assert_null (out_sysroot); /* Early return if no sysroot is requested */