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>
This commit is contained in:
Giuseppe Scrivano committed 2015-11-16 11:07:55 +01:00
1 parent f506644830
commit b393e5a2e9
2 files changed
+1 -2

No files matched your search

-2
View File
@@ -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)
{
+1
View File
@@ -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);
}
}