From 628750d2de7421fe4b26eebd1a6f27c524eb8a7e Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 8 Feb 2023 18:24:33 +0000 Subject: [PATCH] list: Show a warning if we can't load the current version Conceptually similar to the previous commit, except it didn't crash before, just didn't display anything. Signed-off-by: Simon McVittie --- app/flatpak-builtins-list.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/flatpak-builtins-list.c b/app/flatpak-builtins-list.c index 7b3edd20..05ebbb4d 100644 --- a/app/flatpak-builtins-list.c +++ b/app/flatpak-builtins-list.c @@ -182,9 +182,15 @@ print_table_for_refs (gboolean print_apps, continue; } - deploy_data = flatpak_deploy_get_deploy_data (deploy, FLATPAK_DEPLOY_VERSION_CURRENT, cancellable, NULL); + deploy_data = flatpak_deploy_get_deploy_data (deploy, FLATPAK_DEPLOY_VERSION_CURRENT, cancellable, &local_error); + if (deploy_data == NULL) - continue; + { + g_warning (_("Unable to inspect current version of %s: %s"), + partial_ref, local_error->message); + g_clear_error (&local_error); + continue; + } runtime = flatpak_deploy_data_get_runtime (deploy_data);