run: don't print error with for --help

This follows what all the other builtins do: first parse the
commandline, then error out if we got too few arguments.
tingping/wmclass
Matthias Clasen 2015-01-13 19:54:19 -05:00
parent f1c3b1e988
commit 64fc43101d
1 changed files with 3 additions and 3 deletions

View File

@ -175,15 +175,15 @@ xdg_app_builtin_run (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, "APP 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;
app = argv[rest_argv_start];
if (opt_branch)