mirror of
https://github.com/flatpak/flatpak.git
synced 2026-05-19 06:11:47 -04:00
permission store: Add --version
It is expected that --version works.
This commit is contained in:
@@ -54,10 +54,12 @@ on_name_lost (GDBusConnection *connection,
|
||||
|
||||
static gboolean opt_verbose;
|
||||
static gboolean opt_replace;
|
||||
static gboolean opt_version;
|
||||
|
||||
static GOptionEntry entries[] = {
|
||||
{ "verbose", 'v', 0, G_OPTION_ARG_NONE, &opt_verbose, "Print debug information during command processing", NULL },
|
||||
{ "verbose", 'v', 0, G_OPTION_ARG_NONE, &opt_verbose, "Print debug information", NULL },
|
||||
{ "replace", 'r', 0, G_OPTION_ARG_NONE, &opt_replace, "Replace", NULL },
|
||||
{ "version", 0, 0, G_OPTION_ARG_NONE, &opt_version, "Print version and exit", NULL },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
@@ -115,6 +117,12 @@ main (int argc,
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (opt_version)
|
||||
{
|
||||
g_print ("%s\n", PACKAGE_STRING);
|
||||
exit (EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
if (opt_verbose)
|
||||
g_log_set_handler (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, message_handler, NULL);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user