summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2018-09-28 20:27:05 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-10-02 06:21:49 +0000
commite9bf1c3f7545979f3d965ecfd2659953509f4b64 (patch)
treeb228a9a09cc3e235c51a73b28f1cdeb77d0c316d
parent56d975f8c4ccac705e362b7172faff1f377e7274 (diff)
downloadflatpak-e9bf1c3f7545979f3d965ecfd2659953509f4b64.tar.gz
Replace a warning with an error
It is not really nice to have g_warnings pop out of the library left and right, they should be replaced by proper errors as far as possible. This is a small start. Closes: #2150 Approved by: alexlarsson
-rw-r--r--common/flatpak-utils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/flatpak-utils.c b/common/flatpak-utils.c
index 67ab770e..7a86109a 100644
--- a/common/flatpak-utils.c
+++ b/common/flatpak-utils.c
@@ -5692,7 +5692,8 @@ flatpak_check_required_version (const char *ref,
if (required_version)
{
if (sscanf (required_version, "%d.%d.%d", &required_major, &required_minor, &required_micro) != 3)
- g_warning ("Invalid require-flatpak argument %s", required_version);
+ return flatpak_fail_error (error, FLATPAK_ERROR_INVALID_DATA,
+ _("Invalid require-flatpak argument %s"), required_version);
else
{
if (required_major > PACKAGE_MAJOR_VERSION ||