diff --git a/xdg-app-builtins-build.c b/xdg-app-builtins-build.c index 2c920be9..c28a38f8 100644 --- a/xdg-app-builtins-build.c +++ b/xdg-app-builtins-build.c @@ -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];