mirror of
https://github.com/ostreedev/ostree.git
synced 2025-03-19 22:50:35 +03:00
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:
parent
f506644830
commit
b393e5a2e9
@ -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)
|
||||
{
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user