forked from Mirrors/flatpak-builder
Fixup error messages
We were printing argv[3] which is wrong (and typically null). Instead set the error message where it happens and we know what we were trying to do. Closes: #269 Approved by: alexlarssonauto
parent
416b7f599b
commit
8839ff08b1
|
@ -724,7 +724,7 @@ main (int argc,
|
||||||
{
|
{
|
||||||
if (!builder_manifest_show_deps (manifest, build_context, &error))
|
if (!builder_manifest_show_deps (manifest, build_context, &error))
|
||||||
{
|
{
|
||||||
g_printerr ("Error running %s: %s\n", argv[3], error->message);
|
g_printerr ("Error calculating deps: %s\n", error->message);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -736,7 +736,7 @@ main (int argc,
|
||||||
if (!builder_manifest_install_deps (manifest, build_context, opt_install_deps_from, opt_user, opt_installation,
|
if (!builder_manifest_install_deps (manifest, build_context, opt_install_deps_from, opt_user, opt_installation,
|
||||||
opt_yes, &error))
|
opt_yes, &error))
|
||||||
{
|
{
|
||||||
g_printerr ("Error running %s: %s\n", argv[3], error->message);
|
g_printerr ("Error installing deps: %s\n", error->message);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (opt_install_deps_only)
|
if (opt_install_deps_only)
|
||||||
|
|
|
@ -3701,7 +3701,11 @@ builder_manifest_install_dep (BuilderManifest *self,
|
||||||
g_ptr_array_add (args, NULL);
|
g_ptr_array_add (args, NULL);
|
||||||
|
|
||||||
if (!builder_maybe_host_spawnv (NULL, NULL, 0, error, (const char * const *)args->pdata))
|
if (!builder_maybe_host_spawnv (NULL, NULL, 0, error, (const char * const *)args->pdata))
|
||||||
return FALSE;
|
{
|
||||||
|
g_autofree char *commandline = flatpak_quote_argv ((const char **)args->pdata);
|
||||||
|
g_prefix_error (error, "running `%s`: ", commandline);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue