[gnome-software] Don't start the application if the command line arguments were wrong or --help was used



commit 809efb7037422c4818785929be47466f18f7b188
Author: Richard Hughes <richard hughsie com>
Date:   Mon Sep 16 11:36:18 2013 +0100

    Don't start the application if the command line arguments were wrong or --help was used

 src/gs-application.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-application.c b/src/gs-application.c
index 42ab1b0..b9f68dd 100644
--- a/src/gs-application.c
+++ b/src/gs-application.c
@@ -238,11 +238,13 @@ gs_application_command_line (GApplication      *application,
                g_application_command_line_printerr (cmdline, "%s\n", error->message);
                g_error_free (error);
                g_application_command_line_set_exit_status (cmdline, 1);
+               g_application_quit (application);
        }
        else if (help) {
                gchar *text;
                text = g_option_context_get_help (context, FALSE, NULL);
                g_application_command_line_print (cmdline, "%s",  text);
+               g_application_quit (application);
                g_free (text);
        }
        if (verbose)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]