Avoid error for build --help

Those errors are so scary and red, don't show them to somebody
asking for help.
tingping/wmclass
Matthias Clasen 2015-01-13 21:40:33 -05:00
parent 64fc43101d
commit 93de27256d
1 changed files with 3 additions and 4 deletions

View File

@ -76,16 +76,15 @@ xdg_app_builtin_build (int argc, char **argv, GCancellable *cancellable, GError
}
}
if (!xdg_app_option_context_parse (context, options, &argc, &argv, XDG_APP_BUILTIN_FLAG_NO_DIR, NULL, cancellable, error))
goto out;
if (rest_argc == 0)
{
usage_error (context, "DIRECTORY must be specified", error);
goto out;
}
if (!xdg_app_option_context_parse (context, options, &argc, &argv, XDG_APP_BUILTIN_FLAG_NO_DIR, NULL, cancellable, error))
goto out;
directory = argv[rest_argv_start];
if (rest_argc >= 2)
command = argv[rest_argv_start+1];