Skip to content

Commit

Permalink
list: Show a warning if we can't load the current version
Browse files Browse the repository at this point in the history
Conceptually similar to the previous commit, except it didn't crash
before, just didn't display anything.

Signed-off-by: Simon McVittie <[email protected]>
  • Loading branch information
smcv committed Feb 8, 2023
1 parent 5e2e771 commit 628750d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions app/flatpak-builtins-list.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 628750d

Please sign in to comment.