[ostree] ostree: do not print the usage on each G_IO_ERROR_NOT_SUPPORTED
- From: Giuseppe Scrivano <gscrivano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] ostree: do not print the usage on each G_IO_ERROR_NOT_SUPPORTED
- Date: Mon, 16 Nov 2015 10:37:46 +0000 (UTC)
commit b393e5a2e970de97cd5e59861f00589313fc84c6
Author: Giuseppe Scrivano <gscrivan redhat com>
Date: Fri Nov 6 12:06:26 2015 +0100
ostree: do not print the usage on each G_IO_ERROR_NOT_SUPPORTED
It may have a different meaning, and the usage screen is not helpful.
Print the usage screen only when the command is not found.
Signed-off-by: Giuseppe Scrivano <gscrivan redhat com>
src/ostree/main.c | 2 --
src/ostree/ot-main.c | 1 +
2 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/src/ostree/main.c b/src/ostree/main.c
index 8842bf3..99d7d91 100644
--- a/src/ostree/main.c
+++ b/src/ostree/main.c
@@ -75,8 +75,6 @@ main (int argc,
g_set_prgname (argv[0]);
ret = ostree_run (argc, argv, commands, &error);
- if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED))
- ostree_usage (commands, TRUE);
if (error != NULL)
{
diff --git a/src/ostree/ot-main.c b/src/ostree/ot-main.c
index 44e1bd4..5b54af4 100644
--- a/src/ostree/ot-main.c
+++ b/src/ostree/ot-main.c
@@ -190,6 +190,7 @@ ostree_run (int argc,
{
g_set_error (&error, G_IO_ERROR, G_IO_ERROR_FAILED,
"Unknown command '%s'", command_name);
+ ostree_usage (commands, TRUE);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]