mirror of
https://git.proxmox.com/git/fwupd
synced 2026-02-01 19:01:29 +00:00
trivial: fu-util: make JSON mode silent
We don't want to be emitting errors in JSON mode, we should only use return codes.
This commit is contained in:
parent
04c2186edc
commit
b48710aac7
@ -4683,14 +4683,15 @@ main(int argc, char *argv[])
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
#endif
|
||||
g_printerr("%s\n", error->message);
|
||||
if (priv->as_json)
|
||||
g_debug("%s\n", error->message);
|
||||
else
|
||||
g_printerr("%s\n", error->message);
|
||||
if (g_error_matches(error, FWUPD_ERROR, FWUPD_ERROR_INVALID_ARGS)) {
|
||||
/* TRANSLATORS: error message explaining command on how to get help */
|
||||
g_printerr("\n%s\n", _("Use fwupdmgr --help for help"));
|
||||
} else if (g_error_matches(error, FWUPD_ERROR, FWUPD_ERROR_NOTHING_TO_DO)) {
|
||||
g_debug("%s\n", error->message);
|
||||
} else if (g_error_matches(error, FWUPD_ERROR, FWUPD_ERROR_NOTHING_TO_DO))
|
||||
return EXIT_NOTHING_TO_DO;
|
||||
}
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user