forked from Mirrors/flatpak-builder
Improve an error message
When the build directory does not exist or looks uninitialized in flatpak build, report a helpful message that points at flatpak build-init.tingping/wmclass
parent
636130db49
commit
0e9125619c
|
@ -116,8 +116,12 @@ flatpak_builtin_build (int argc, char **argv, GCancellable *cancellable, GError
|
|||
command = argv[rest_argv_start + 1];
|
||||
|
||||
app_deploy = g_file_new_for_commandline_arg (directory);
|
||||
|
||||
metadata = g_file_get_child (app_deploy, "metadata");
|
||||
|
||||
if (!g_file_query_exists (app_deploy, NULL) ||
|
||||
!g_file_query_exists (metadata, NULL))
|
||||
return flatpak_fail (error, _("Build directory %s not initialized, use flatpak build-init"), directory);
|
||||
|
||||
if (!g_file_load_contents (metadata, cancellable, &metadata_contents, &metadata_size, NULL, error))
|
||||
return FALSE;
|
||||
|
||||
|
|
Loading…
Reference in New Issue