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 2015-11-06 12:06:26 +01:00
parent f506644830
commit b393e5a2e9
2 changed files with 1 additions and 2 deletions

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)
{

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);
}
}