From b393e5a2e970de97cd5e59861f00589313fc84c6 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Fri, 6 Nov 2015 12:06:26 +0100 Subject: [PATCH] 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 --- src/ostree/main.c | 2 -- src/ostree/ot-main.c | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ostree/main.c b/src/ostree/main.c index 8842bf34..99d7d916 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 44e1bd49..5b54af4c 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); } }