trivial: fu-util: show a better error for non-responsive daemon

See #2212 for more context.
This commit is contained in:
Mario Limonciello 2020-06-23 19:13:29 -05:00 committed by Mario Limonciello
parent 4669dd590a
commit a11eab61e1

View File

@ -2544,6 +2544,15 @@ fu_util_check_daemon_version (FuUtilPrivate *priv, GError **error)
{
const gchar *daemon = fwupd_client_get_daemon_version (priv->client);
if (daemon == NULL) {
g_set_error_literal (error,
FWUPD_ERROR,
FWUPD_ERROR_NOT_SUPPORTED,
/* TRANSLATORS: error message */
_("Unable to connect to service"));
return FALSE;
}
if (g_strcmp0 (daemon, SOURCE_VERSION) != 0) {
g_set_error (error,
FWUPD_ERROR,