diff options
author | Simon McVittie <smcv@collabora.com> | 2023-02-08 18:24:33 +0000 |
---|---|---|
committer | Simon McVittie <smcv@collabora.com> | 2023-02-08 21:14:17 +0000 |
commit | 628750d2de7421fe4b26eebd1a6f27c524eb8a7e (patch) | |
tree | 097fc3e15798c15a56416dcd2d19f8f0b9d5865e | |
parent | 5e2e771ece06f37b3f9f60089ede718fa8bcaf8e (diff) | |
download | flatpak-628750d2de7421fe4b26eebd1a6f27c524eb8a7e.tar.gz |
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 <smcv@collabora.com>
-rw-r--r-- | app/flatpak-builtins-list.c | 10 |
1 files 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); |